Skip to content

Commit

Permalink
test: update for new EOF validations
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Aug 9, 2024
1 parent 8645d4b commit 0b5aec1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/revmc/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1280,14 +1280,13 @@ fn eof(code: &[u8]) -> Bytes {
#[track_caller]
fn eof_sections(code: &[&[u8]]) -> Bytes {
let eof = eof_sections_unchecked(code);
match revm_interpreter::analysis::validate_eof(&eof) {
match revm_interpreter::analysis::validate_eof_inner(&eof, None) {
Ok(()) => {}
Err(EofError::Decode(e)) => panic!("{e}"),
Err(EofError::Validation(e)) => match e {
EofValidationError::UnknownOpcode
if code.iter().any(|code| code.contains(&TEST_SUSPEND)) => {}
EofValidationError::InvalidTypesSection => {}
EofValidationError::MaxStackMismatch => {}
EofValidationError::InvalidTypesSection | EofValidationError::MaxStackMismatch => {}
e => panic!("validation error: {e:?}"),
},
}
Expand Down Expand Up @@ -1316,7 +1315,7 @@ fn eof_body(code: &[&[u8]], containers: Vec<Bytes>) -> primitives::eof::EofBody
code_section: code.iter().copied().map(Bytes::copy_from_slice).collect(),
container_section: containers,
data_section: Bytes::from_static(DEF_DATA),
is_data_filled: false,
is_data_filled: true,
}
}

Expand Down

0 comments on commit 0b5aec1

Please sign in to comment.