diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-17 15:01:51 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-17 15:01:51 -0700 |
commit | f344b250f6f062a1a1902bf69b23ebf9b565de0e (patch) | |
tree | 199bd32a9aee198d5028b1c21b83d2cf0944b2b6 /html/050scenario.cc.html | |
parent | 897ae8c1855f830d8819759ea327d147f28a09bf (diff) | |
download | mu-f344b250f6f062a1a1902bf69b23ebf9b565de0e.tar.gz |
3395
Diffstat (limited to 'html/050scenario.cc.html')
-rw-r--r-- | html/050scenario.cc.html | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/html/050scenario.cc.html b/html/050scenario.cc.html index 9dcedc44..3130380a 100644 --- a/html/050scenario.cc.html +++ b/html/050scenario.cc.html @@ -45,7 +45,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Delimiter">:(scenario scenario_block)</span> scenario foo [ run [ - <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">13</span> + <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">13</span> ] memory-should-contain [ <span class="Constant">1</span><span class="Special"> <- </span><span class="Constant">13</span> @@ -56,13 +56,13 @@ scenario foo [ <span class="Delimiter">:(scenario scenario_multiple_blocks)</span> scenario foo [ run [ - <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">13</span> + <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">13</span> ] memory-should-contain [ <span class="Constant">1</span><span class="Special"> <- </span><span class="Constant">13</span> ] run [ - <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">13</span> + <span class="Constant">2</span>:num<span class="Special"> <- </span>copy <span class="Constant">13</span> ] memory-should-contain [ <span class="Constant">1</span><span class="Special"> <- </span><span class="Constant">13</span> @@ -74,7 +74,7 @@ scenario foo [ <span class="Delimiter">:(scenario scenario_check_memory_and_trace)</span> scenario foo [ run [ - <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">13</span> + <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">13</span> trace <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [a b c] ] memory-should-contain [ @@ -131,13 +131,13 @@ scenario parse_scenario<span class="Delimiter">(</span>istream& in<span clas <span class="Delimiter">:(scenario read_scenario_with_bracket_in_comment)</span> scenario foo [ <span class="Comment"># ']' in comment</span> - <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">0</span> + <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">0</span> ] <span class="traceContains">+run: {1: "number"} <- copy {0: "literal"}</span> <span class="Delimiter">:(scenario read_scenario_with_bracket_in_comment_in_nested_string)</span> scenario foo [ - <span class="Constant">1</span>:address:array:character<span class="Special"> <- </span><span class="Normal">new</span> [<span class="Comment"># not a comment]</span> + <span class="Constant">1</span>:text<span class="Special"> <- </span><span class="Normal">new</span> [<span class="Comment"># not a comment]</span> ] <span class="traceContains">+run: {1: ("address" "array" "character")} <- new {"# not a comment": "literal-string"}</span> @@ -261,7 +261,7 @@ Name[r][<span class="Constant">"__maybe_make_raw_test__"</span>] = Res vector<recipe_ordinal> tmp = load<span class="Delimiter">(</span> <span class="Constant">"def scenario_foo [</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span class="Constant">" local-scope</span><span class="cSpecial">\n</span><span class="Constant">"</span> - <span class="Constant">" __maybe_make_raw_test__:number <- copy 34</span><span class="cSpecial">\n</span><span class="Constant">"</span> + <span class="Constant">" __maybe_make_raw_test__:num <- copy 34</span><span class="cSpecial">\n</span><span class="Constant">"</span> <span class="Constant">"]</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">);</span> mark_autogenerated<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">));</span> bind_special_scenario_names<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">));</span> @@ -277,10 +277,10 @@ Name[r][<span class="Constant">"__maybe_make_raw_test__"</span>] = Res <span class="Special">% Hide_errors = true;</span> <span class="Special">% Disable_redefine_checks = true;</span> def scenario-foo [ - <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span> + <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">34</span> ] def scenario-foo [ - <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">35</span> + <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">35</span> ] <span class="traceContains">+error: redefining recipe scenario-foo</span> @@ -295,7 +295,7 @@ def scenario-foo [ <span class="Delimiter">:(scenario run)</span> def main [ run [ - <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">13</span> + <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">13</span> ] ] <span class="traceContains">+mem: storing 13 in location 1</span> @@ -332,10 +332,10 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Delimiter">:(scenario run_multiple)</span> def main [ run [ - <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">13</span> + <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">13</span> ] run [ - <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">13</span> + <span class="Constant">2</span>:num<span class="Special"> <- </span>copy <span class="Constant">13</span> ] ] <span class="traceContains">+mem: storing 13 in location 1</span> @@ -447,7 +447,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"checking string length at "</span> << address << end<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>get_or_insert<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address<span class="Delimiter">)</span> != SIZE<span class="Delimiter">(</span>literal<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Current_scenario && !Scenario_testing_scenario<span class="Delimiter">)</span> - raise << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span> << Current_scenario<span class="Delimiter">-></span>name << <span class="Constant">": expected location '"</span> << address << <span class="Constant">"' to contain length "</span> << SIZE<span class="Delimiter">(</span>literal<span class="Delimiter">)</span> << <span class="Constant">" of string ["</span> << literal << <span class="Constant">"] but saw "</span> << no_scientific<span class="Delimiter">(</span>get_or_insert<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address<span class="Delimiter">))</span> << <span class="Constant">" ("</span> << read_mu_string<span class="Delimiter">(</span>address-<span class="Comment">/*</span><span class="Comment">fake refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">)</span> << <span class="Constant">")</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + raise << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span> << Current_scenario<span class="Delimiter">-></span>name << <span class="Constant">": expected location '"</span> << address << <span class="Constant">"' to contain length "</span> << SIZE<span class="Delimiter">(</span>literal<span class="Delimiter">)</span> << <span class="Constant">" of string ["</span> << literal << <span class="Constant">"] but saw "</span> << no_scientific<span class="Delimiter">(</span>get_or_insert<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address<span class="Delimiter">))</span> << <span class="Constant">" ("</span> << read_mu_text<span class="Delimiter">(</span>address-<span class="Comment">/*</span><span class="Comment">fake refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">)</span> << <span class="Constant">")</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Normal">else</span> raise << <span class="Constant">"expected location '"</span> << address << <span class="Constant">"' to contain length "</span> << SIZE<span class="Delimiter">(</span>literal<span class="Delimiter">)</span> << <span class="Constant">" of string ["</span> << literal << <span class="Constant">"] but saw "</span> << no_scientific<span class="Delimiter">(</span>get_or_insert<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address<span class="Delimiter">))</span> << <span class="cSpecial">'\n'</span> << end<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!Scenario_testing_scenario<span class="Delimiter">)</span> Passed = <span class="Constant">false</span><span class="Delimiter">;</span> @@ -486,10 +486,10 @@ def main [ <span class="Special">% Scenario_testing_scenario = true;</span> <span class="Special">% Hide_errors = true;</span> def main [ - <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">3</span> - <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">97</span> <span class="Comment"># 'a'</span> - <span class="Constant">3</span>:number<span class="Special"> <- </span>copy <span class="Constant">98</span> <span class="Comment"># 'b'</span> - <span class="Constant">4</span>:number<span class="Special"> <- </span>copy <span class="Constant">99</span> <span class="Comment"># 'c'</span> + <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">3</span> + <span class="Constant">2</span>:num<span class="Special"> <- </span>copy <span class="Constant">97</span> <span class="Comment"># 'a'</span> + <span class="Constant">3</span>:num<span class="Special"> <- </span>copy <span class="Constant">98</span> <span class="Comment"># 'b'</span> + <span class="Constant">4</span>:num<span class="Special"> <- </span>copy <span class="Constant">99</span> <span class="Comment"># 'c'</span> memory-should-contain [ <span class="Constant">1</span>:array:character<span class="Special"> <- </span>[ab] ] @@ -498,10 +498,10 @@ def main [ <span class="Delimiter">:(scenario memory_check_string)</span> def main [ - <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">3</span> - <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">97</span> <span class="Comment"># 'a'</span> - <span class="Constant">3</span>:number<span class="Special"> <- </span>copy <span class="Constant">98</span> <span class="Comment"># 'b'</span> - <span class="Constant">4</span>:number<span class="Special"> <- </span>copy <span class="Constant">99</span> <span class="Comment"># 'c'</span> + <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">3</span> + <span class="Constant">2</span>:num<span class="Special"> <- </span>copy <span class="Constant">97</span> <span class="Comment"># 'a'</span> + <span class="Constant">3</span>:num<span class="Special"> <- </span>copy <span class="Constant">98</span> <span class="Comment"># 'b'</span> + <span class="Constant">4</span>:num<span class="Special"> <- </span>copy <span class="Constant">99</span> <span class="Comment"># 'c'</span> memory-should-contain [ <span class="Constant">1</span>:array:character<span class="Special"> <- </span>[abc] ] @@ -724,7 +724,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span raise << maybe<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'check-trace-count-for-label' should be a number (count), but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>!is_literal_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!is_literal_text<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"second ingredient of 'check-trace-count-for-label' should be a literal string (label), but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> |