Fix bug with reporting number of tests run.
@@ -140,6 +140,10 @@ pub fn run(filter_regex: Option<regex::Regex>) {
("balance_test_contract", "bal_opcode"),
];
+ let total_number_of_tests = positive_project_names.len()
+ + negative_project_names.len()
+ + contract_and_project_names.len();
+
// Filter them first.
let (contracts, projects): (Vec<_>, Vec<_>) = contract_and_project_names
.iter()
@@ -148,13 +152,14 @@ pub fn run(filter_regex: Option<regex::Regex>) {
.unzip();
// Deploy and then test.
+ number_of_tests_run += projects.len();
for name in contracts {
harness::deploy_contract(name)
}
for name in projects {
harness::runs_on_node(name);
}
- let total_number_of_tests = positive_project_names.len() + negative_project_names.len();
+
if number_of_tests_run == 0 {
println!(
"No tests were run. Regex filter \"{}\" filtered out all {} tests.",
