Skip to content

Commit

Permalink
remove unused tests/log (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
weilzkm authored Jun 8, 2024
1 parent c3f0dfc commit 84e2fc1
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 475,714 deletions.
75 changes: 0 additions & 75 deletions src/mips_emulator/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,79 +160,4 @@ mod tests {

instrumented_state.split_segment(true, OUTPUT, new_writer);
}

#[test]
fn test_execute_nested_fib() {
let path = PathBuf::from("./test-vectors/fib");
let data = fs::read(path).expect("could not read file");
let file =
ElfBytes::<AnyEndian>::minimal_parse(data.as_slice()).expect("opening elf file failed");
let (mut state, _) = State::load_elf(&file);

state.patch_go(&file);
state.patch_stack(vec![]);

let mut instrumented_state = InstrumentedState::new(state, String::from(""));

let mut step_number = 0usize;
loop {
if instrumented_state.state.exited {
break;
}
instrumented_state.step();
step_number += 1;
}

println!("total steps {}", step_number);
}

#[test]
fn test_execute_fib() {
let path = PathBuf::from("./test-vectors/fib2");
let data = fs::read(path).expect("could not read file");
let file =
ElfBytes::<AnyEndian>::minimal_parse(data.as_slice()).expect("opening elf file failed");
let (mut state, _) = State::load_elf(&file);

state.patch_go(&file);
state.patch_stack(vec![]);

let mut instrumented_state = InstrumentedState::new(state, String::from(""));

let mut step_number = 0usize;
loop {
if instrumented_state.state.exited {
break;
}
instrumented_state.step();
step_number += 1;
}

println!("total steps {}", step_number);
}

#[test]
fn test_execute_simple_add() {
let path = PathBuf::from("./test-vectors/simpleArith");
let data = fs::read(path).expect("could not read file");
let file =
ElfBytes::<AnyEndian>::minimal_parse(data.as_slice()).expect("opening elf file failed");
let (mut state, _) = State::load_elf(&file);

state.patch_go(&file);
state.patch_stack(vec![]);

let mut instrumented_state = InstrumentedState::new(state, String::from(""));

let mut step_number = 0usize;
loop {
if instrumented_state.state.exited {
break;
}
instrumented_state.step();
step_number += 1;
}

println!("total steps {}", step_number);
}
}
Binary file removed test-vectors/fib
Binary file not shown.
Binary file removed test-vectors/fib2
Binary file not shown.
418,399 changes: 0 additions & 418,399 deletions test-vectors/hello.log

This file was deleted.

57,240 changes: 0 additions & 57,240 deletions test-vectors/hello1.log

This file was deleted.

Binary file removed test-vectors/simpleArith
Binary file not shown.
Binary file removed test-vectors/test_local_app
Binary file not shown.

0 comments on commit 84e2fc1

Please sign in to comment.