client test creating

This commit is contained in:
Nikolay Volf 2016-01-26 14:39:49 +04:00
parent 95e96a653f
commit 800154a8ae
2 changed files with 21 additions and 0 deletions

20
src/tests/client.rs Normal file
View File

@ -0,0 +1,20 @@
use ethereum;
use client::{BlockChainClient,Client};
use std::env;
use pod_state::*;
#[test]
fn test_client_is_created() {
let mut spec = ethereum::new_frontier_like_test();
spec.set_genesis_state(PodState::from_json(test.find("pre").unwrap()));
spec.overwrite_genesis(test.find("genesisBlockHeader").unwrap());
let mut dir = env::temp_dir();
dir.push(H32::random().hex());
let client_result = Client::new(spec, &dir, IOChannel::disconnected());
assert!(client_result.is_ok());
}

View File

@ -4,3 +4,4 @@ mod test_common;
mod transaction;
mod executive;
mod state;
mod client;