Skip to content

Commit

Permalink
test: Add ValidBlocks and InvalidBlocks blockchain tests
Browse files Browse the repository at this point in the history
Implements the TODO in tests.rs by adding test coverage for ValidBlocks and 
InvalidBlocks test suites from the Ethereum test cases. This enhances our test 
coverage by including these important blockchain test cases that verify valid 
and invalid block processing.

The implementation:
- Adds a new blockchain_test! macro for running blockchain tests
- Creates a new blockchain_tests module
- Implements tests for both ValidBlocks and InvalidBlocks test suites
  • Loading branch information
VolodymyrBg authored Jan 19, 2025
1 parent 88de40a commit ca40bc7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions testing/ef-tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,20 @@ mod general_state_tests {
}

// TODO: Add ValidBlocks and InvalidBlocks tests

macro_rules! blockchain_test {
($test_name:ident, $dir:ident) => {
#[test]
fn $test_name() {
BlockchainTests::new(format!("BlockchainTests/{}", stringify!($dir))).run();
}
};
}

#[allow(missing_docs)]
mod blockchain_tests {
use super::*;

blockchain_test!(valid_blocks, ValidBlocks);
blockchain_test!(invalid_blocks, InvalidBlocks);
}

0 comments on commit ca40bc7

Please sign in to comment.