diff --git a/ethcore/src/json_tests/executive.rs b/ethcore/src/json_tests/executive.rs index 25535adab..11288ae2d 100644 --- a/ethcore/src/json_tests/executive.rs +++ b/ethcore/src/json_tests/executive.rs @@ -240,6 +240,7 @@ where } } +/// run an json executive test pub fn json_executive_test( path: &Path, json_data: &[u8], diff --git a/ethcore/src/json_tests/mod.rs b/ethcore/src/json_tests/mod.rs index 5f1cad9ad..004d86d69 100644 --- a/ethcore/src/json_tests/mod.rs +++ b/ethcore/src/json_tests/mod.rs @@ -19,12 +19,14 @@ mod chain; mod difficulty; mod executive; -pub mod runner; mod state; mod test_common; mod transaction; mod trie; +/// executor of ethereum/json tests +pub mod runner; + pub use self::{ executive::json_executive_test, test_common::{debug_include_test, find_json_files_recursive, HookType}, diff --git a/ethcore/src/json_tests/runner.rs b/ethcore/src/json_tests/runner.rs index 18bad4a7f..4b22146fa 100644 --- a/ethcore/src/json_tests/runner.rs +++ b/ethcore/src/json_tests/runner.rs @@ -59,6 +59,7 @@ impl std::ops::AddAssign for TestResult { } } +/// An executor of ethereum/json tests pub struct TestRunner(EthereumTestSuite); impl TestRunner { diff --git a/ethcore/src/json_tests/test_common.rs b/ethcore/src/json_tests/test_common.rs index 2af7616fb..73a6a500c 100644 --- a/ethcore/src/json_tests/test_common.rs +++ b/ethcore/src/json_tests/test_common.rs @@ -27,6 +27,7 @@ pub enum HookType { OnStop, } +/// find all json files recursively from a path pub fn find_json_files_recursive(path: &PathBuf) -> Vec { WalkDir::new(path) .into_iter() @@ -36,6 +37,7 @@ pub fn find_json_files_recursive(path: &PathBuf) -> Vec { .collect::>() } +/// check if the test is selected to execute via TEST_DEBUG environment variable pub fn debug_include_test(name: &str) -> bool { match std::env::var_os("TEST_DEBUG") { Some(s) => s.to_string_lossy().split_terminator(",").any(|expr| {