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 pod_state::*;
|
||||||
use block::Block;
|
use block::Block;
|
||||||
use ethereum;
|
use ethereum;
|
||||||
use super::helpers::*;
|
use tests::helpers::*;
|
||||||
|
|
||||||
pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
|
pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
|
||||||
init_log();
|
init_log();
|
@ -1,6 +1,6 @@
|
|||||||
use client::{BlockChainClient,Client};
|
use client::{BlockChainClient,Client};
|
||||||
use super::test_common::*;
|
use super::test_common::*;
|
||||||
use super::helpers::*;
|
use tests::helpers::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn created() {
|
fn created() {
|
@ -1,6 +1,6 @@
|
|||||||
use super::test_common::*;
|
use super::test_common::*;
|
||||||
use super::helpers::*;
|
|
||||||
use super::chain::json_chain_test;
|
use super::chain::json_chain_test;
|
||||||
|
use tests::helpers::*;
|
||||||
|
|
||||||
fn do_json_test(json_data: &[u8]) -> Vec<String> {
|
fn do_json_test(json_data: &[u8]) -> Vec<String> {
|
||||||
json_chain_test(json_data, ChainEra::Homestead)
|
json_chain_test(json_data, ChainEra::Homestead)
|
@ -1,5 +1,5 @@
|
|||||||
use super::test_common::*;
|
use super::test_common::*;
|
||||||
use super::helpers::*;
|
use tests::helpers::*;
|
||||||
use super::state::json_chain_test;
|
use super::state::json_chain_test;
|
||||||
|
|
||||||
fn do_json_test(json_data: &[u8]) -> Vec<String> {
|
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::test_common::*;
|
||||||
use super::helpers::*;
|
use tests::helpers::*;
|
||||||
use pod_state::*;
|
use pod_state::*;
|
||||||
use state_diff::*;
|
use state_diff::*;
|
||||||
use ethereum;
|
use ethereum;
|
@ -12,7 +12,6 @@ macro_rules! declare_test {
|
|||||||
#[ignore]
|
#[ignore]
|
||||||
#[test]
|
#[test]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
#[cfg(feature="json-tests")]
|
|
||||||
fn $id() {
|
fn $id() {
|
||||||
test!($name);
|
test!($name);
|
||||||
}
|
}
|
||||||
@ -21,7 +20,6 @@ macro_rules! declare_test {
|
|||||||
#[cfg(feature = "test-heavy")]
|
#[cfg(feature = "test-heavy")]
|
||||||
#[test]
|
#[test]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
#[cfg(feature="json-tests")]
|
|
||||||
fn $id() {
|
fn $id() {
|
||||||
test!($name);
|
test!($name);
|
||||||
}
|
}
|
||||||
@ -29,7 +27,6 @@ macro_rules! declare_test {
|
|||||||
($id: ident, $name: expr) => {
|
($id: ident, $name: expr) => {
|
||||||
#[test]
|
#[test]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
#[cfg(feature="json-tests")]
|
|
||||||
fn $id() {
|
fn $id() {
|
||||||
test!($name);
|
test!($name);
|
||||||
}
|
}
|
@ -108,4 +108,8 @@ mod executive;
|
|||||||
mod externalities;
|
mod externalities;
|
||||||
mod verification;
|
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 client::{BlockChainClient,Client};
|
||||||
use std::env;
|
use std::env;
|
||||||
use super::test_common::*;
|
use common::*;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use spec::*;
|
use spec::*;
|
||||||
use std::fs::{remove_dir_all};
|
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;
|
pub mod helpers;
|
||||||
mod homestead_state;
|
|
||||||
mod homestead_chain;
|
|
@ -64,6 +64,7 @@ impl Transaction {
|
|||||||
sender: RefCell::new(None),
|
sender: RefCell::new(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new message-call transaction.
|
/// Create a new message-call transaction.
|
||||||
pub fn new_call(to: Address, value: U256, data: Bytes, gas: U256, gas_price: U256, nonce: U256) -> Transaction {
|
pub fn new_call(to: Address, value: U256, data: Bytes, gas: U256, gas_price: U256, nonce: U256) -> Transaction {
|
||||||
Transaction {
|
Transaction {
|
||||||
|
Loading…
Reference in New Issue
Block a user