about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-14 16:40:28 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-14 16:40:28 -0700
commit580f63893e13900384bdcd7ac21510c3fb0fca87 (patch)
tree8f08d32913d10ace2246a69999cd60ae5895defc /cpp
parentf3a3bdf1e0a21059cb481c9ffd79ef7c7da2a0b7 (diff)
downloadmu-580f63893e13900384bdcd7ac21510c3fb0fca87.tar.gz
907 - fix old tangle tests
Diffstat (limited to 'cpp')
-rw-r--r--cpp/tangle/030tangle.test.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/cpp/tangle/030tangle.test.cc b/cpp/tangle/030tangle.test.cc
index 36ce2d1f..663161ba 100644
--- a/cpp/tangle/030tangle.test.cc
+++ b/cpp/tangle/030tangle.test.cc
@@ -84,7 +84,7 @@ void test_tangle_supports_scenarios() {
   istringstream in(":(scenario does_bar)\nabc def\n+layer1: pqr\n+layer2: xyz");
   list<string> lines;
   tangle(in, lines);
-  CHECK_EQ(lines.front(), "void test_does_bar() {");  lines.pop_front();
+  CHECK_EQ(lines.front(), "TEST(does_bar)");  lines.pop_front();
   CHECK_EQ(lines.front(), "  run(\"abc def\\n\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "  CHECK_TRACE_CONTENTS(\"layer1: pqrlayer2: xyz\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "}");  lines.pop_front();
@@ -95,7 +95,7 @@ void test_tangle_supports_configurable_toplevel() {
   istringstream in(":(scenarios foo)\n:(scenario does_bar)\nabc def\n+layer1: pqr");
   list<string> lines;
   tangle(in, lines);
-  CHECK_EQ(lines.front(), "void test_does_bar() {");  lines.pop_front();
+  CHECK_EQ(lines.front(), "TEST(does_bar)");  lines.pop_front();
   CHECK_EQ(lines.front(), "  foo(\"abc def\\n\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "  CHECK_TRACE_CONTENTS(\"layer1: pqr\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "}");  lines.pop_front();
@@ -109,7 +109,7 @@ void test_tangle_supports_strings_in_scenarios() {
   istringstream in(":(scenario does_bar)\nabc \"def\"\n+layer1: pqr\n+layer2: \"xyz\"");
   list<string> lines;
   tangle(in, lines);
-  CHECK_EQ(lines.front(), "void test_does_bar() {");  lines.pop_front();
+  CHECK_EQ(lines.front(), "TEST(does_bar)");  lines.pop_front();
   CHECK_EQ(lines.front(), "  run(\"abc \\\"def\\\"\\n\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "  CHECK_TRACE_CONTENTS(\"layer1: pqrlayer2: \\\"xyz\\\"\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "}");  lines.pop_front();
@@ -120,7 +120,7 @@ void test_tangle_supports_strings_in_scenarios2() {
   istringstream in(":(scenario does_bar)\nabc \"\"\n+layer1: pqr\n+layer2: \"\"");
   list<string> lines;
   tangle(in, lines);
-  CHECK_EQ(lines.front(), "void test_does_bar() {");  lines.pop_front();
+  CHECK_EQ(lines.front(), "TEST(does_bar)");  lines.pop_front();
   CHECK_EQ(lines.front(), "  run(\"abc \\\"\\\"\\n\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "  CHECK_TRACE_CONTENTS(\"layer1: pqrlayer2: \\\"\\\"\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "}");  lines.pop_front();
@@ -131,7 +131,7 @@ void test_tangle_supports_multiline_input_in_scenarios() {
   istringstream in(":(scenario does_bar)\nabc def\n  efg\n+layer1: pqr\n+layer2: \"\"");
   list<string> lines;
   tangle(in, lines);
-  CHECK_EQ(lines.front(), "void test_does_bar() {");  lines.pop_front();
+  CHECK_EQ(lines.front(), "TEST(does_bar)");  lines.pop_front();
   CHECK_EQ(lines.front(), "  run(\"abc def\\n  efg\\n\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "  CHECK_TRACE_CONTENTS(\"layer1: pqrlayer2: \\\"\\\"\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "}");  lines.pop_front();
@@ -142,7 +142,7 @@ void test_tangle_supports_reset_in_scenarios() {
   istringstream in(":(scenario does_bar)\nabc def\n===\nefg\n+layer1: pqr\n+layer2: \"\"");
   list<string> lines;
   tangle(in, lines);
-  CHECK_EQ(lines.front(), "void test_does_bar() {");  lines.pop_front();
+  CHECK_EQ(lines.front(), "TEST(does_bar)");  lines.pop_front();
   CHECK_EQ(lines.front(), "  run(\"abc def\\n\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "  CLEAR_TRACE;");  lines.pop_front();
   CHECK_EQ(lines.front(), "  run(\"efg\\n\");");  lines.pop_front();
@@ -155,7 +155,7 @@ void test_tangle_can_check_for_absence_at_end_of_scenarios() {
   istringstream in(":(scenario does_bar)\nabc def\n  efg\n+layer1: pqr\n-layer1: xyz");
   list<string> lines;
   tangle(in, lines);
-  CHECK_EQ(lines.front(), "void test_does_bar() {");  lines.pop_front();
+  CHECK_EQ(lines.front(), "TEST(does_bar)");  lines.pop_front();
   CHECK_EQ(lines.front(), "  run(\"abc def\\n  efg\\n\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "  CHECK_TRACE_CONTENTS(\"layer1: pqr\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "  CHECK_TRACE_DOESNT_CONTAIN(\"layer1: xyz\");");  lines.pop_front();
@@ -167,7 +167,7 @@ void test_tangle_can_check_for_absence_at_end_of_scenarios2() {
   istringstream in(":(scenario does_bar)\nabc def\n  efg\n-layer1: pqr\n-layer1: xyz");
   list<string> lines;
   tangle(in, lines);
-  CHECK_EQ(lines.front(), "void test_does_bar() {");  lines.pop_front();
+  CHECK_EQ(lines.front(), "TEST(does_bar)");  lines.pop_front();
   CHECK_EQ(lines.front(), "  run(\"abc def\\n  efg\\n\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "  CHECK_TRACE_DOESNT_CONTAIN(\"layer1: pqr\");");  lines.pop_front();
   CHECK_EQ(lines.front(), "  CHECK_TRACE_DOESNT_CONTAIN(\"layer1: xyz\");");  lines.pop_front();
@@ -179,7 +179,7 @@ void test_tangle_can_check_return_values_of_scenarios() {
   istringstream in(":(scenario does_bar)\nabc def\n=> pqr");
   list<string> lines;
   tangle(in, lines);
-  CHECK_EQ(lines.front(), "void test_does_bar() {");  lines.pop_front();
+  CHECK_EQ(lines.front(), "TEST(does_bar)");  lines.pop_front();
   CHECK_EQ(lines.front(), "{");  lines.pop_front();
   CHECK_EQ(lines.front(), "  ostringstream os;");  lines.pop_front();
   CHECK_EQ(lines.front(), "  TEMP(tmp, run(\"abc def\\n\"));");  lines.pop_front();
@@ -194,7 +194,7 @@ void test_tangle_can_check_return_values_of_multiple_scenarios() {
   istringstream in(":(scenario does_bar)\nabc\n=> pqr\n+layer1: pqr\ndef\n=> xyz\n");
   list<string> lines;
   tangle(in, lines);
-  CHECK_EQ(lines.front(), "void test_does_bar() {");  lines.pop_front();
+  CHECK_EQ(lines.front(), "TEST(does_bar)");  lines.pop_front();
   CHECK_EQ(lines.front(), "{");  lines.pop_front();
   CHECK_EQ(lines.front(), "  ostringstream os;");  lines.pop_front();
   CHECK_EQ(lines.front(), "  TEMP(tmp, run(\"abc\\n\"));");  lines.pop_front();