diff --git a/src/evm/factory.rs b/src/evm/factory.rs index 064eeb15c..b1cb012a6 100644 --- a/src/evm/factory.rs +++ b/src/evm/factory.rs @@ -69,11 +69,11 @@ macro_rules! evm_test( #[test] #[cfg(feature = "jit")] fn $name_jit() { - $name_test(super::Factory::new(super::factory::VMType::Jit)); + $name_test(Factory::new(VMType::Jit)); } #[test] fn $name_int() { - $name_test(super::Factory::new(super::factory::VMType::Interpreter)); + $name_test(Factory::new(VMType::Interpreter)); } } ); diff --git a/src/evm/tests.rs b/src/evm/tests.rs index b919c2438..a818a38fc 100644 --- a/src/evm/tests.rs +++ b/src/evm/tests.rs @@ -1,6 +1,6 @@ use common::*; use evm; -use evm::{Ext, Schedule}; +use evm::{Ext, Schedule, Factory, VMType}; struct FakeLogEntry { topics: Vec, diff --git a/src/executive.rs b/src/executive.rs index 9173c5444..6fe78f165 100644 --- a/src/executive.rs +++ b/src/executive.rs @@ -533,21 +533,6 @@ mod tests { assert_eq!(expected_address, contract_address(&address, &U256::from(88))); } - // TODO [todr] this is copy-pasted for evm::factory - macro_rules! evm_test( - ($name_test: ident: $name_jit: ident, $name_int: ident) => { - #[test] - #[cfg(feature = "jit")] - fn $name_jit() { - $name_test(Factory::new(VMType::Jit)); - } - #[test] - fn $name_int() { - $name_test(Factory::new(VMType::Interpreter)); - } - } - ); - // TODO: replace params with transactions! evm_test!{test_sender_balance: test_sender_balance_jit, test_sender_balance_int} fn test_sender_balance(factory: Factory) { diff --git a/src/lib.rs b/src/lib.rs index 8610404d2..e3c8a5274 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -88,6 +88,8 @@ extern crate env_logger; pub mod common; pub mod basic_types; +#[macro_use] +pub mod evm; pub mod executive; pub mod error; pub mod log_entry; @@ -105,7 +107,6 @@ pub mod spec; pub mod views; pub mod blockchain; pub mod extras; -pub mod evm; #[cfg(test)] mod tests;