From 84f675021cc096003d99fa10db2e078e59e73bb0 Mon Sep 17 00:00:00 2001 From: "adria0.eth" <5526331+adria0@users.noreply.github.com> Date: Wed, 30 Sep 2020 13:10:54 +0200 Subject: [PATCH] Fix warnings (#64) --- ethcore/src/json_tests/executive.rs | 1 + ethcore/src/json_tests/mod.rs | 4 +++- ethcore/src/json_tests/runner.rs | 1 + ethcore/src/json_tests/test_common.rs | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) 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| {