Upgrade to edition 2021
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
extern crate rustijvm;
|
||||
|
||||
fn steps(machine: &mut rustijvm::Machine, num: usize) {
|
||||
fn steps(machine: &mut rustijvm::machine::Machine, num: usize) {
|
||||
for _ in 0..num {
|
||||
machine.step().unwrap();
|
||||
}
|
||||
@@ -8,7 +8,7 @@ fn steps(machine: &mut rustijvm::Machine, num: usize) {
|
||||
|
||||
#[test]
|
||||
fn task3_goto1() {
|
||||
let mut machine = rustijvm::Machine::new_from_file("files/task3/GOTO1.ijvm").unwrap();
|
||||
let mut machine = rustijvm::machine::Machine::new_from_file("files/task3/GOTO1.ijvm").unwrap();
|
||||
machine.set_output(rustijvm::stubs::output_stub());
|
||||
|
||||
steps(&mut machine, 1);
|
||||
@@ -20,7 +20,7 @@ fn task3_goto1() {
|
||||
|
||||
#[test]
|
||||
fn task3_goto2() {
|
||||
let mut machine = rustijvm::Machine::new_from_file("files/task3/GOTO2.ijvm").unwrap();
|
||||
let mut machine = rustijvm::machine::Machine::new_from_file("files/task3/GOTO2.ijvm").unwrap();
|
||||
machine.set_output(rustijvm::stubs::output_stub());
|
||||
|
||||
steps(&mut machine, 1);
|
||||
@@ -34,7 +34,7 @@ fn task3_goto2() {
|
||||
|
||||
#[test]
|
||||
fn task3_ifeq1() {
|
||||
let mut machine = rustijvm::Machine::new_from_file("files/task3/IFEQ1.ijvm").unwrap();
|
||||
let mut machine = rustijvm::machine::Machine::new_from_file("files/task3/IFEQ1.ijvm").unwrap();
|
||||
machine.set_output(rustijvm::stubs::output_stub());
|
||||
|
||||
steps(&mut machine, 1);
|
||||
@@ -73,7 +73,7 @@ fn task3_ifeq1() {
|
||||
|
||||
#[test]
|
||||
fn task3_iflt1() {
|
||||
let mut machine = rustijvm::Machine::new_from_file("files/task3/IFLT1.ijvm").unwrap();
|
||||
let mut machine = rustijvm::machine::Machine::new_from_file("files/task3/IFLT1.ijvm").unwrap();
|
||||
machine.set_output(rustijvm::stubs::output_stub());
|
||||
|
||||
let mut pc = 0;
|
||||
@@ -102,7 +102,7 @@ fn task3_iflt1() {
|
||||
|
||||
#[test]
|
||||
fn task3_ificmpeq1() {
|
||||
let mut machine = rustijvm::Machine::new_from_file("files/task3/IFICMPEQ1.ijvm").unwrap();
|
||||
let mut machine = rustijvm::machine::Machine::new_from_file("files/task3/IFICMPEQ1.ijvm").unwrap();
|
||||
machine.set_output(rustijvm::stubs::output_stub());
|
||||
|
||||
let mut pc = 0;
|
||||
|
||||
Reference in New Issue
Block a user