Fixing evm_test macro export

This commit is contained in:
Tomusdrw 2016-01-14 17:42:17 +01:00
parent abb4f08eff
commit d3a71d3058
4 changed files with 5 additions and 19 deletions

View File

@ -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));
}
}
);

View File

@ -1,6 +1,6 @@
use common::*;
use evm;
use evm::{Ext, Schedule};
use evm::{Ext, Schedule, Factory, VMType};
struct FakeLogEntry {
topics: Vec<H256>,

View File

@ -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) {

View File

@ -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;