about summary refs log tree commit diff stats
path: root/tangle
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-01-19 20:53:00 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-01-19 20:53:18 -0800
commit7163e18a774781c62f0c0542e4cb9037f6a71d22 (patch)
tree6cb88378652a2124ce701d8d96428fbc8fb8f552 /tangle
parentff9d5f43cfcc18e853de8d92ade1f962961fa516 (diff)
downloadmu-7163e18a774781c62f0c0542e4cb9037f6a71d22.tar.gz
2575 - better messages on trace count failures
Diffstat (limited to 'tangle')
-rw-r--r--tangle/030tangle.cc2
-rw-r--r--tangle/030tangle.test.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/tangle/030tangle.cc b/tangle/030tangle.cc
index 618d7fa1..c4a3db5f 100644
--- a/tangle/030tangle.cc
+++ b/tangle/030tangle.cc
@@ -318,7 +318,7 @@ void emit_test(const string& name, list<Line>& lines, list<Line>& result) {
       size_t pos = in.find(": ");
       string layer = in.substr(1, pos-1);
       string count = in.substr(pos+2);
-      result.push_back(Line("  CHECK_EQ(trace_count(\""+layer+"\"), "+count+");", front(lines)));
+      result.push_back(Line("  CHECK_TRACE_COUNT(\""+layer+"\", "+count+");", front(lines)));
       lines.pop_front();
     }
     if (!lines.empty() && front(lines).contents == "===") {
diff --git a/tangle/030tangle.test.cc b/tangle/030tangle.test.cc
index d44a408a..7a329803 100644
--- a/tangle/030tangle.test.cc
+++ b/tangle/030tangle.test.cc
@@ -321,7 +321,7 @@ void test_tangle_can_check_for_count_in_scenario() {
   CHECK_EQ(lines.front().contents, "void test_does_bar() {");  lines.pop_front();
   CHECK_EQ(lines.front().contents, "  Trace_file = \"does_bar\";"); lines.pop_front();
   CHECK_EQ(lines.front().contents, "  run(\"abc def\\n  efg\\n\");");  lines.pop_front();
-  CHECK_EQ(lines.front().contents, "  CHECK_EQ(trace_count(\"layer1\"), 2);");  lines.pop_front();
+  CHECK_EQ(lines.front().contents, "  CHECK_TRACE_COUNT(\"layer1\", 2);");  lines.pop_front();
   CHECK_EQ(lines.front().contents, "}");  lines.pop_front();
   CHECK(lines.empty());
 }
@@ -335,7 +335,7 @@ void test_tangle_can_handle_mu_comments_in_scenario() {
   CHECK_EQ(lines.front().contents, "  run(\"abc def\\n# comment1\\n  efg\\n  # indented comment 2\\n\");");  lines.pop_front();
   CHECK_EQ(lines.front().contents, "  CHECK_TRACE_CONTENTS(\"layer1: pqrlayer1: xyz\");");  lines.pop_front();
   CHECK_EQ(lines.front().contents, "  CHECK_TRACE_DOESNT_CONTAIN(\"layer1: z\");");  lines.pop_front();
-  CHECK_EQ(lines.front().contents, "  CHECK_EQ(trace_count(\"layer1\"), 2);");  lines.pop_front();
+  CHECK_EQ(lines.front().contents, "  CHECK_TRACE_COUNT(\"layer1\", 2);");  lines.pop_front();
   CHECK_EQ(lines.front().contents, "}");  lines.pop_front();
   CHECK(lines.empty());
 }