Fix warnings (#64)
This commit is contained in:
parent
03bfb012a1
commit
84f675021c
@ -240,6 +240,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// run an json executive test
|
||||||
pub fn json_executive_test<H: FnMut(&str, HookType)>(
|
pub fn json_executive_test<H: FnMut(&str, HookType)>(
|
||||||
path: &Path,
|
path: &Path,
|
||||||
json_data: &[u8],
|
json_data: &[u8],
|
||||||
|
@ -19,12 +19,14 @@
|
|||||||
mod chain;
|
mod chain;
|
||||||
mod difficulty;
|
mod difficulty;
|
||||||
mod executive;
|
mod executive;
|
||||||
pub mod runner;
|
|
||||||
mod state;
|
mod state;
|
||||||
mod test_common;
|
mod test_common;
|
||||||
mod transaction;
|
mod transaction;
|
||||||
mod trie;
|
mod trie;
|
||||||
|
|
||||||
|
/// executor of ethereum/json tests
|
||||||
|
pub mod runner;
|
||||||
|
|
||||||
pub use self::{
|
pub use self::{
|
||||||
executive::json_executive_test,
|
executive::json_executive_test,
|
||||||
test_common::{debug_include_test, find_json_files_recursive, HookType},
|
test_common::{debug_include_test, find_json_files_recursive, HookType},
|
||||||
|
@ -59,6 +59,7 @@ impl std::ops::AddAssign for TestResult {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// An executor of ethereum/json tests
|
||||||
pub struct TestRunner(EthereumTestSuite);
|
pub struct TestRunner(EthereumTestSuite);
|
||||||
|
|
||||||
impl TestRunner {
|
impl TestRunner {
|
||||||
|
@ -27,6 +27,7 @@ pub enum HookType {
|
|||||||
OnStop,
|
OnStop,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// find all json files recursively from a path
|
||||||
pub fn find_json_files_recursive(path: &PathBuf) -> Vec<PathBuf> {
|
pub fn find_json_files_recursive(path: &PathBuf) -> Vec<PathBuf> {
|
||||||
WalkDir::new(path)
|
WalkDir::new(path)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
@ -36,6 +37,7 @@ pub fn find_json_files_recursive(path: &PathBuf) -> Vec<PathBuf> {
|
|||||||
.collect::<Vec<PathBuf>>()
|
.collect::<Vec<PathBuf>>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// check if the test is selected to execute via TEST_DEBUG environment variable
|
||||||
pub fn debug_include_test(name: &str) -> bool {
|
pub fn debug_include_test(name: &str) -> bool {
|
||||||
match std::env::var_os("TEST_DEBUG") {
|
match std::env::var_os("TEST_DEBUG") {
|
||||||
Some(s) => s.to_string_lossy().split_terminator(",").any(|expr| {
|
Some(s) => s.to_string_lossy().split_terminator(",").any(|expr| {
|
||||||
|
Loading…
Reference in New Issue
Block a user