From 580f63893e13900384bdcd7ac21510c3fb0fca87 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 14 Mar 2015 16:40:28 -0700 Subject: 907 - fix old tangle tests --- cpp/tangle/030tangle.test.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'cpp') 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 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 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 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 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 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 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 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 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 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 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(); -- cgit 1.4.1-2-gfad0