From a1557e08e34da5055e6f832138968b72a91ad03d Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 26 May 2015 16:15:07 -0700 Subject: 1475 --- 050scenario.cc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/050scenario.cc b/050scenario.cc index 8df08e77..c4acc688 100644 --- a/050scenario.cc +++ b/050scenario.cc @@ -220,11 +220,18 @@ void check_memory(const string& s) { raise << "duplicate expectation for location " << address << '\n'; trace(Primitive_recipe_depth, "run") << "checking location " << address; if (Memory[address] != value) { - if (Current_scenario) + if (Current_scenario && !Hide_warnings) { + // genuine test in a mu file raise << "\nF - " << Current_scenario->name << ": expected location " << address << " to contain " << value << " but saw " << Memory[address] << '\n'; - else + } + else { + // just testing scenario support raise << "expected location " << address << " to contain " << value << " but saw " << Memory[address] << '\n'; - Passed = false; + } + if (!Hide_warnings) { + Passed = false; + ++Num_failures; + } return; } locations_checked.insert(address); @@ -267,10 +274,14 @@ void check_string(long long int address, const string& literal) { for (long long int i = 0; i < SIZE(literal); ++i) { trace(Primitive_recipe_depth, "run") << "checking location " << address+i; if (Memory[address+i] != literal.at(i)) { - if (Current_scenario && !Hide_warnings) + if (Current_scenario && !Hide_warnings) { + // genuine test in a mu file raise << "\nF - " << Current_scenario->name << ": expected location " << (address+i) << " to contain " << literal.at(i) << " but saw " << Memory[address+i] << '\n'; - else + } + else { + // just testing scenario support raise << "expected location " << (address+i) << " to contain " << literal.at(i) << " but saw " << Memory[address+i] << '\n'; + } if (!Hide_warnings) { Passed = false; ++Num_failures; -- cgit 1.4.1-2-gfad0