Skip to content

Commit

Permalink
all bitwise tests now passing, 624 tests in total checked
Browse files Browse the repository at this point in the history
  • Loading branch information
max-wickham committed Mar 30, 2024
1 parent a481743 commit 1336710
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/evm_logic/evm/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ pub fn make_call(
}
}},
ExecutionResult::Success(success) => {
println!("Merging context");
runtime.merge_context();
match success {
ExecutionSuccess::Return(result) => {
Expand Down
2 changes: 1 addition & 1 deletion src/evm_logic/evm/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn decode_instruction(

// Provides debug data around each branches block
if evm.program_counter > evm.program.len() - 1 {
return ExecutionResult::Error(ExecutionError::Halted);
return ExecutionResult::Success(ExecutionSuccess::Stop);
}

let opcode: u8 = evm.program[evm.program_counter];
Expand Down
2 changes: 1 addition & 1 deletion test_gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub fn generate_official_tests_from_folder(input: TokenStream) -> TokenStream {

for i in 0..num_tests {
let test_name = Ident::new(
format!("run_test_{}_{}",test_name.replace("+", "pos").replace("-", "min"), i).as_str(),
format!("run_test_{}_{}_{}",folder_name_lit.value().replace("/", "_").replace(".", ""), test_name.replace("+", "pos").replace("-", "min"), i).as_str(),
proc_macro2::Span::call_site(),
);
tests.push(quote! {
Expand Down
3 changes: 3 additions & 0 deletions tests/official_tests/official_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@ generate_official_tests_from_folder!(
generate_official_tests_from_file!(
"./tests/official_tests/tests/GeneralStateTests/stMemoryTest/buffer.json"
);
generate_official_tests_from_folder!(
"./tests/official_tests/tests/GeneralStateTests/VMTests/vmBitwiseLogicOperation"
);

0 comments on commit 1336710

Please sign in to comment.