From dddc384c5124febdf111730fa760dcb6a06e7155 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 20 Oct 2016 20:19:29 -0700 Subject: 3531 Be consistent in checking for Scenario_testing_scenario when signalling that a Mu scenario failed. --- 050scenario.cc | 6 +++--- 082scenario_screen.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/050scenario.cc b/050scenario.cc index 7f3178c9..4cc284e8 100644 --- a/050scenario.cc +++ b/050scenario.cc @@ -179,7 +179,7 @@ void run_mu_scenario(const scenario& s) { transform_all(); run(tmp.front()); // End Mu Test Teardown - if (!Hide_errors && trace_count("error") > 0) + if (!Hide_errors && trace_count("error") > 0 && !Scenario_testing_scenario) Passed = false; if (!Passed) ++Num_failures; @@ -533,7 +533,7 @@ void check_trace(const string& expected) { << "in trace with label '" << expected_lines.at(curr_expected_line).label << "'\n" << end(); if (!Hide_errors) DUMP(expected_lines.at(curr_expected_line).label); - Passed = false; + if (!Scenario_testing_scenario) Passed = false; } vector parse_trace(const string& expected) { @@ -621,7 +621,7 @@ bool check_trace_missing(const string& in) { for (int i = 0; i < SIZE(lines); ++i) { if (trace_count(lines.at(i).label, lines.at(i).contents) != 0) { raise << "unexpected [" << lines.at(i).contents << "] in trace with label '" << lines.at(i).label << "'\n" << end(); - Passed = false; + if (!Scenario_testing_scenario) Passed = false; return false; } } diff --git a/082scenario_screen.cc b/082scenario_screen.cc index c6862f9b..73660fb5 100644 --- a/082scenario_screen.cc +++ b/082scenario_screen.cc @@ -267,7 +267,7 @@ void check_screen(const string& expected_contents, const int color) { if (cursor.at_end()) break; if (cursor.get() != '.') { raise << Current_scenario->name << ": each row of the expected screen should start with a '.'\n" << end(); - Passed = false; + if (!Scenario_testing_scenario) Passed = false; return; } for (int column = 0; column < screen_width; ++column, addr+= /*size of screen-cell*/2) { @@ -323,7 +323,7 @@ void check_screen(const string& expected_contents, const int color) { } if (cursor.get() != '.') { raise << Current_scenario->name << ": row " << row << " of the expected screen is too long\n" << end(); - Passed = false; + if (!Scenario_testing_scenario) Passed = false; return; } } -- cgit 1.4.1-2-gfad0