about summary refs log tree commit diff stats
path: root/cpp/049scenario_helpers.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-02 15:52:22 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-02 22:56:13 -0700
commit22b3069272c1a177e814a7c4e769e20858e2b368 (patch)
tree761199b26823fe5ba11af66108e95ece1bc4f02c /cpp/049scenario_helpers.cc
parenta316f1e4168a98ba8c1bbe7b091f8a7e7b3f03e6 (diff)
downloadmu-22b3069272c1a177e814a7c4e769e20858e2b368.tar.gz
1242 - simpler implementation for 'scenario'
Also now has the side effect that scenarios can have any number of 'run'
or check or any future blocks, in any order.
Diffstat (limited to 'cpp/049scenario_helpers.cc')
-rw-r--r--cpp/049scenario_helpers.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/cpp/049scenario_helpers.cc b/cpp/049scenario_helpers.cc
index fa584565..d5b755f2 100644
--- a/cpp/049scenario_helpers.cc
+++ b/cpp/049scenario_helpers.cc
@@ -12,15 +12,6 @@ recipe main [
 ]
 +mem: storing 13 in location 1
 
-:(scenario run_handles_comments)
-recipe main [
-  run [
-    # comment
-    1:integer <- copy 13:literal
-  ]
-]
-+mem: storing 13 in location 1
-
 :(before "End Globals")
 size_t Num_temporary_recipes = 0;
 :(before "End Setup")
@@ -208,6 +199,7 @@ bool check_trace(const string& expected) {
 
   raise << "missing [" << expected_lines[curr_expected_line].second << "] "
         << "in trace layer " << expected_lines[curr_expected_line].first << '\n';
+  Passed = false;
   return false;
 }
 
@@ -293,6 +285,7 @@ bool check_trace_missing(const string& in) {
   for (size_t i = 0; i < lines.size(); ++i) {
     if (trace_count(lines[i].first, lines[i].second) != 0) {
       raise << "unexpected [" << lines[i].second << "] in trace layer " << lines[i].first << '\n';
+      Passed = false;
       return false;
     }
   }