Skip to content

Commit

Permalink
chore(executor): Cover Builder (#676)
Browse files Browse the repository at this point in the history
* chore: coverage

* fix: inline test method
  • Loading branch information
refcell authored Oct 9, 2024
1 parent afb3810 commit 69f8f3a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions crates/executor/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,30 @@ where
}
}
}

#[cfg(test)]
mod tests {
use super::*;
use kona_mpt::{NoopTrieHinter, NoopTrieProvider};

#[test]
fn test_build_full() {
let config = RollupConfig::default();
let parent_header = Header::default().seal_slow();

fn test_handler_register<F, H>(_: &mut EvmHandler<'_, (), &mut State<&mut TrieDB<F, H>>>)
where
F: TrieProvider,
H: TrieHinter,
{
}

let executor =
StatelessL2BlockExecutorBuilder::new(&config, NoopTrieProvider, NoopTrieHinter)
.with_handle_register(test_handler_register)
.build();

assert_eq!(*executor.config, config);
assert_eq!(*executor.trie_db.parent_block_header(), parent_header);
}
}

0 comments on commit 69f8f3a

Please sign in to comment.