Now with Atomicity
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
extern crate rustijvm;
|
||||
|
||||
use std::rc::Rc;
|
||||
use std::sync::Mutex;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::io::{Cursor, Seek, SeekFrom, Read};
|
||||
|
||||
fn steps(machine: &mut rustijvm::Machine, num: usize) {
|
||||
@@ -12,7 +11,7 @@ fn steps(machine: &mut rustijvm::Machine, num: usize) {
|
||||
|
||||
#[test]
|
||||
fn advanced1() {
|
||||
let output: Rc<Mutex<Cursor<Vec<u8>>>> = Rc::new(Mutex::new(Cursor::new(Vec::new())));
|
||||
let output: Arc<Mutex<Cursor<Vec<u8>>>> = Arc::new(Mutex::new(Cursor::new(Vec::new())));
|
||||
let input = Box::new("A".as_bytes());
|
||||
let mut machine = rustijvm::Machine::new_from_file("files/task5/all_regular.ijvm").unwrap();
|
||||
machine.set_input(input);
|
||||
|
||||
Reference in New Issue
Block a user