Make all tests not output anything
This commit is contained in:
@@ -4,8 +4,9 @@ use std::sync::{Arc, Mutex};
|
||||
use std::io::{Cursor, Seek, SeekFrom, Read};
|
||||
|
||||
fn run_calc(input: &'static str, expected: &str) {
|
||||
let rc = Arc::new(Mutex::new(Cursor::new(Vec::new())));
|
||||
let rc = rustijvm::stubs::output_stub();
|
||||
let mut machine = rustijvm::Machine::new_from_file("files/advanced/SimpleCalc.ijvm").unwrap();
|
||||
|
||||
machine.set_input(Box::new(input.as_bytes()));
|
||||
machine.set_output(rc.clone());
|
||||
machine.run().unwrap();
|
||||
@@ -33,3 +34,8 @@ fn advanced6_recurse2() {
|
||||
fn advanced6_recurse3() {
|
||||
run_calc("8!?.", "40320\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn advanced6_recurse4() {
|
||||
run_calc("5!5+?.", "125\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user