From 5a2cb154eb016aa8b84ad939f63eb56dd7a0a90f Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 2 Oct 2018 01:21:01 -0700 Subject: 4649 --- html/subx/040---tests.cc.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'html/subx/040---tests.cc.html') diff --git a/html/subx/040---tests.cc.html b/html/subx/040---tests.cc.html index 52be02b3..b51870bc 100644 --- a/html/subx/040---tests.cc.html +++ b/html/subx/040---tests.cc.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { 4 //: knows about labels and will emit labels for previous layers to transform. 5 :(after "Begin Transforms") 6 // Begin Level-4 Transforms - 7 Transform.push_back(create_test_function); + 7 Transform.push_back(create_test_function); 8 // End Level-4 Transforms 9 10 :(scenario run_test) @@ -87,21 +87,21 @@ if ('onhashchange' in window) { 25 void create_test_function(program& p) { 26 if (p.segments.empty()) return; 27 segment& code = p.segments.at(0); -28 trace(99, "transform") << "-- create 'run_tests'" << end(); +28 trace(99, "transform") << "-- create 'run_tests'" << end(); 29 vector<line> new_insts; 30 for (int i = 0; i < SIZE(code.lines); ++i) { 31 line& inst = code.lines.at(i); 32 for (int j = 0; j < SIZE(inst.words); ++j) { 33 const word& curr = inst.words.at(j); -34 if (*curr.data.rbegin() != ':') continue; // not a label -35 if (!starts_with(curr.data, "test_")) continue; -36 string fn = drop_last(curr.data); +34 if (*curr.data.rbegin() != ':') continue; // not a label +35 if (!starts_with(curr.data, "test_")) continue; +36 string fn = drop_last(curr.data); 37 new_insts.push_back(call(fn)); 38 } 39 } 40 if (new_insts.empty()) return; // no tests found 41 code.lines.push_back(label("run_tests")); -42 code.lines.insert(code.lines.end(), new_insts.begin(), new_insts.end()); +42 code.lines.insert(code.lines.end(), new_insts.begin(), new_insts.end()); 43 code.lines.push_back(ret()); 44 } 45 @@ -127,14 +127,14 @@ if ('onhashchange' in window) { 65 66 word call() { 67 word result; -68 result.data = "e8"; +68 result.data = "e8"; 69 result.metadata.push_back("call"); 70 return result; 71 } 72 73 word disp32(string s) { 74 word result; -75 result.data = s; +75 result.data = s; 76 result.metadata.push_back("disp32"); 77 return result; 78 } @@ -142,7 +142,7 @@ if ('onhashchange' in window) { 80 line ret() { 81 line result; 82 result.words.push_back(word()); -83 result.words.back().data = "c3"; +83 result.words.back().data = "c3"; 84 result.words.back().metadata.push_back("return"); 85 return result; 86 } -- cgit 1.4.1-2-gfad0