split tests and json_tests
This commit is contained in:
parent
bb2104d312
commit
1b6fe392f8
@ -3,7 +3,7 @@ use client::{BlockChainClient,Client};
|
||||
use pod_state::*;
|
||||
use block::Block;
|
||||
use ethereum;
|
||||
use super::helpers::*;
|
||||
use tests::helpers::*;
|
||||
|
||||
pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
|
||||
init_log();
|
@ -1,6 +1,6 @@
|
||||
use client::{BlockChainClient,Client};
|
||||
use super::test_common::*;
|
||||
use super::helpers::*;
|
||||
use tests::helpers::*;
|
||||
|
||||
#[test]
|
||||
fn created() {
|
||||
@ -75,4 +75,4 @@ fn can_collect_garbage() {
|
||||
let client = client_result.reference();
|
||||
client.tick();
|
||||
assert!(client.cache_info().blocks < 100 * 1024);
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
use super::test_common::*;
|
||||
use super::helpers::*;
|
||||
use super::chain::json_chain_test;
|
||||
use tests::helpers::*;
|
||||
|
||||
fn do_json_test(json_data: &[u8]) -> Vec<String> {
|
||||
json_chain_test(json_data, ChainEra::Homestead)
|
@ -1,5 +1,5 @@
|
||||
use super::test_common::*;
|
||||
use super::helpers::*;
|
||||
use tests::helpers::*;
|
||||
use super::state::json_chain_test;
|
||||
|
||||
fn do_json_test(json_data: &[u8]) -> Vec<String> {
|
10
ethcore/src/json_tests/mod.rs
Normal file
10
ethcore/src/json_tests/mod.rs
Normal file
@ -0,0 +1,10 @@
|
||||
#[macro_use]
|
||||
mod test_common;
|
||||
|
||||
mod transaction;
|
||||
mod executive;
|
||||
mod state;
|
||||
mod client;
|
||||
mod chain;
|
||||
mod homestead_state;
|
||||
mod homestead_chain;
|
@ -1,5 +1,5 @@
|
||||
use super::test_common::*;
|
||||
use super::helpers::*;
|
||||
use tests::helpers::*;
|
||||
use pod_state::*;
|
||||
use state_diff::*;
|
||||
use ethereum;
|
@ -12,7 +12,6 @@ macro_rules! declare_test {
|
||||
#[ignore]
|
||||
#[test]
|
||||
#[allow(non_snake_case)]
|
||||
#[cfg(feature="json-tests")]
|
||||
fn $id() {
|
||||
test!($name);
|
||||
}
|
||||
@ -21,7 +20,6 @@ macro_rules! declare_test {
|
||||
#[cfg(feature = "test-heavy")]
|
||||
#[test]
|
||||
#[allow(non_snake_case)]
|
||||
#[cfg(feature="json-tests")]
|
||||
fn $id() {
|
||||
test!($name);
|
||||
}
|
||||
@ -29,7 +27,6 @@ macro_rules! declare_test {
|
||||
($id: ident, $name: expr) => {
|
||||
#[test]
|
||||
#[allow(non_snake_case)]
|
||||
#[cfg(feature="json-tests")]
|
||||
fn $id() {
|
||||
test!($name);
|
||||
}
|
@ -108,4 +108,8 @@ mod executive;
|
||||
mod externalities;
|
||||
mod verification;
|
||||
|
||||
#[cfg(test)] mod tests;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
#[cfg(test)]
|
||||
#[cfg(feature="json-tests")]
|
||||
mod json_tests;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use client::{BlockChainClient,Client};
|
||||
use std::env;
|
||||
use super::test_common::*;
|
||||
use common::*;
|
||||
use std::path::PathBuf;
|
||||
use spec::*;
|
||||
use std::fs::{remove_dir_all};
|
||||
|
@ -1,11 +1 @@
|
||||
#[macro_use]
|
||||
mod test_common;
|
||||
|
||||
mod transaction;
|
||||
mod executive;
|
||||
mod state;
|
||||
mod client;
|
||||
mod chain;
|
||||
pub mod helpers;
|
||||
mod homestead_state;
|
||||
mod homestead_chain;
|
@ -64,6 +64,7 @@ impl Transaction {
|
||||
sender: RefCell::new(None),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a new message-call transaction.
|
||||
pub fn new_call(to: Address, value: U256, data: Bytes, gas: U256, gas_price: U256, nonce: U256) -> Transaction {
|
||||
Transaction {
|
||||
|
Loading…
Reference in New Issue
Block a user