Skip to content

Commit

Permalink
remove unused tests
Browse files Browse the repository at this point in the history
  • Loading branch information
weilzkm committed Jun 7, 2024
1 parent 2db4a70 commit 6262cbe
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 46 deletions.
47 changes: 1 addition & 46 deletions src/mips_emulator/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ mod tests {

#[test]
fn test_execute_c_hello() {
let path = PathBuf::from("./test-vectors/hello2");
let path = PathBuf::from("./test-vectors/hello");
let data = fs::read(path).expect("could not read file");
let file =
ElfBytes::<AnyEndian>::minimal_parse(data.as_slice()).expect("opening elf file failed");
Expand Down Expand Up @@ -115,27 +115,6 @@ mod tests {
}
}

#[test]
fn test_execute_rust_hello() {
log::debug!("open abc\n");
let path = PathBuf::from("./test-vectors/abc");
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(""));
log::debug!("begin execute\n");
for _ in 0..400000 {
if instrumented_state.state.exited {
break;
}
instrumented_state.step();
}
}

#[test]
fn test_execute_rust_fib() {
let path = PathBuf::from("./test-vectors/rust_fib");
Expand Down Expand Up @@ -224,30 +203,6 @@ mod tests {
instrumented_state.split_segment(true, OUTPUT, new_writer);
}

#[test]
fn test_execute_app() {
let path = PathBuf::from("./test-vectors/test_local_app");
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 = 0;
loop {
if instrumented_state.state.exited {
break;
}
instrumented_state.step();
step_number += 1;
}
println!("total steps {}", step_number);
}

#[test]
fn test_execute_nested_fib() {
let path = PathBuf::from("./test-vectors/fib");
Expand Down
Binary file removed test-vectors/abc
Binary file not shown.
Binary file removed test-vectors/evm-no-std
Binary file not shown.
Binary file removed test-vectors/evm_gnu
Binary file not shown.
Binary file removed test-vectors/evm_musl
Binary file not shown.
Binary file removed test-vectors/fib3
Binary file not shown.
Binary file removed test-vectors/hello2
Binary file not shown.

0 comments on commit 6262cbe

Please sign in to comment.