diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-07-22 13:11:40 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-07-22 13:11:40 -0700 |
commit | 63f3ada69baba2cbf7a3a4cbb7e6fed847983d41 (patch) | |
tree | bf4193e0c403e64b1dba1b650ad1b5a96c0f9c29 | |
parent | 57807016a794fd8e4195fba6a6a8115f56553ea2 (diff) | |
download | mu-63f3ada69baba2cbf7a3a4cbb7e6fed847983d41.tar.gz |
3122
More accurate count of failing tests.
-rw-r--r-- | 050scenario.cc | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/050scenario.cc b/050scenario.cc index bb5a88b8..b0388dc6 100644 --- a/050scenario.cc +++ b/050scenario.cc @@ -343,10 +343,7 @@ void check_memory(const string& s) { else // just testing scenario support raise << "location '" << address << "' can't contain non-number " << rhs << '\n' << end(); - if (!Scenario_testing_scenario) { - Passed = false; - ++Num_failures; - } + if (!Scenario_testing_scenario) Passed = false; return; } double value = to_double(rhs); @@ -362,10 +359,7 @@ void check_memory(const string& s) { // just testing scenario support raise << "expected location '" << address << "' to contain " << no_scientific(value) << " but saw " << no_scientific(get_or_insert(Memory, address)) << '\n' << end(); } - if (!Scenario_testing_scenario) { - Passed = false; - ++Num_failures; - } + if (!Scenario_testing_scenario) Passed = false; return; } locations_checked.insert(address); @@ -401,10 +395,7 @@ void check_string(int address, const string& literal) { raise << "\nF - " << Current_scenario->name << ": expected location '" << address << "' to contain length " << SIZE(literal) << " of string [" << literal << "] but saw " << no_scientific(get_or_insert(Memory, address)) << " (" << read_mu_string(address) << ")\n" << end(); else raise << "expected location '" << address << "' to contain length " << SIZE(literal) << " of string [" << literal << "] but saw " << no_scientific(get_or_insert(Memory, address)) << '\n' << end(); - if (!Scenario_testing_scenario) { - Passed = false; - ++Num_failures; - } + if (!Scenario_testing_scenario) Passed = false; return; } ++address; // now skip length @@ -419,10 +410,7 @@ void check_string(int address, const string& literal) { // just testing scenario support raise << "expected location " << (address+i) << " to contain " << literal.at(i) << " but saw " << no_scientific(get_or_insert(Memory, address+i)) << '\n' << end(); } - if (!Scenario_testing_scenario) { - Passed = false; - ++Num_failures; - } + if (!Scenario_testing_scenario) Passed = false; return; } } |