about summary refs log tree commit diff stats
path: root/html/050scenario.cc.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/050scenario.cc.html')
-rw-r--r--html/050scenario.cc.html126
1 files changed, 63 insertions, 63 deletions
diff --git a/html/050scenario.cc.html b/html/050scenario.cc.html
index 43a9bd49..ac47b8a0 100644
--- a/html/050scenario.cc.html
+++ b/html/050scenario.cc.html
@@ -102,7 +102,7 @@ if ('onhashchange' in window) {
 <span id="L37" class="LineNr"> 37 </span><span class="muScenario"><a href='050scenario.cc.html#L57'>scenario</a></span> foo [
 <span id="L38" class="LineNr"> 38 </span>  run [
 <span id="L39" class="LineNr"> 39 </span>    <span class="Constant">1</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">13</span>
-<span id="L40" class="LineNr"> 40 </span>    <a href='003trace.cc.html#L169'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [a b c]
+<span id="L40" class="LineNr"> 40 </span>    <a href='003trace.cc.html#L161'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [a b c]
 <span id="L41" class="LineNr"> 41 </span>  ]
 <span id="L42" class="LineNr"> 42 </span>  memory-should-contain [
 <span id="L43" class="LineNr"> 43 </span>    <span class="Constant">1</span><span class="Special"> &lt;- </span><span class="Constant">13</span>
@@ -157,16 +157,16 @@ if ('onhashchange' in window) {
 <span id="L92" class="LineNr"> 92 </span>  <a href='050scenario.cc.html#L57'>scenario</a> result<span class="Delimiter">;</span>
 <span id="L93" class="LineNr"> 93 </span>  result<span class="Delimiter">.</span>name = <a href='011load.cc.html#L167'>next_word</a><span class="Delimiter">(</span>in<span class="Delimiter">);</span>
 <span id="L94" class="LineNr"> 94 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>contains_key<span class="Delimiter">(</span>Scenario_names<span class="Delimiter">,</span> result<span class="Delimiter">.</span>name<span class="Delimiter">))</span>
-<span id="L95" class="LineNr"> 95 </span>    <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;duplicate <a href='050scenario.cc.html#L57'>scenario</a> name: '&quot;</span> &lt;&lt; result<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span>
+<span id="L95" class="LineNr"> 95 </span>    <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;duplicate <a href='050scenario.cc.html#L57'>scenario</a> name: '&quot;</span> &lt;&lt; result<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
 <span id="L96" class="LineNr"> 96 </span>  Scenario_names<span class="Delimiter">.</span>insert<span class="Delimiter">(</span>result<span class="Delimiter">.</span>name<span class="Delimiter">);</span>
 <span id="L97" class="LineNr"> 97 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>result<span class="Delimiter">.</span>name<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span>
 <span id="L98" class="LineNr"> 98 </span>    assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span>
-<span id="L99" class="LineNr"> 99 </span>    <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;incomplete <a href='050scenario.cc.html#L57'>scenario</a> at <a href='003trace.cc.html#L193'>end</a> of file</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span>
+<span id="L99" class="LineNr"> 99 </span>    <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;incomplete <a href='050scenario.cc.html#L57'>scenario</a> at <a href='003trace.cc.html#L185'>end</a> of file</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
 <span id="L100" class="LineNr">100 </span>    <span class="Identifier">return</span> result<span class="Delimiter">;</span>
 <span id="L101" class="LineNr">101 </span>  <span class="Delimiter">}</span>
 <span id="L102" class="LineNr">102 </span>  <a href='011load.cc.html#L209'>skip_whitespace_and_comments</a><span class="Delimiter">(</span>in<span class="Delimiter">);</span>
 <span id="L103" class="LineNr">103 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> != <span class="Constant">'['</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
-<span id="L104" class="LineNr">104 </span>    <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;Expected '[' after <a href='050scenario.cc.html#L57'>scenario</a> '&quot;</span> &lt;&lt; result<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span>
+<span id="L104" class="LineNr">104 </span>    <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;Expected '[' after <a href='050scenario.cc.html#L57'>scenario</a> '&quot;</span> &lt;&lt; result<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
 <span id="L105" class="LineNr">105 </span>    exit<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span>
 <span id="L106" class="LineNr">106 </span>  <span class="Delimiter">}</span>
 <span id="L107" class="LineNr">107 </span>  <span class="Comment">// scenarios are take special 'code' strings so we need to ignore brackets</span>
@@ -174,13 +174,13 @@ if ('onhashchange' in window) {
 <span id="L109" class="LineNr">109 </span>  result<span class="Delimiter">.</span>to_run = <a href='014literal_string.cc.html#L33'>slurp_quoted</a><span class="Delimiter">(</span>in<span class="Delimiter">);</span>
 <span id="L110" class="LineNr">110 </span>  <span class="Comment">// delete [] delimiters</span>
 <span id="L111" class="LineNr">111 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>!starts_with<span class="Delimiter">(</span>result<span class="Delimiter">.</span>to_run<span class="Delimiter">,</span> <span class="Constant">&quot;[&quot;</span><span class="Delimiter">))</span> <span class="Delimiter">{</span>
-<span id="L112" class="LineNr">112 </span>    <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;scenario &quot;</span> &lt;&lt; result<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot; should start with '['</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span>
+<span id="L112" class="LineNr">112 </span>    <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;scenario &quot;</span> &lt;&lt; result<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot; should start with '['</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
 <span id="L113" class="LineNr">113 </span>    result<span class="Delimiter">.</span><a href='050scenario.cc.html#L60'>clear</a><span class="Delimiter">();</span>
 <span id="L114" class="LineNr">114 </span>    <span class="Identifier">return</span> result<span class="Delimiter">;</span>
 <span id="L115" class="LineNr">115 </span>  <span class="Delimiter">}</span>
 <span id="L116" class="LineNr">116 </span>  result<span class="Delimiter">.</span>to_run<span class="Delimiter">.</span>erase<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">1</span><span class="Delimiter">);</span>
 <span id="L117" class="LineNr">117 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>result<span class="Delimiter">.</span>to_run<span class="Delimiter">.</span>at<span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>result<span class="Delimiter">.</span>to_run<span class="Delimiter">)</span>-<span class="Constant">1</span><span class="Delimiter">)</span> != <span class="Constant">']'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
-<span id="L118" class="LineNr">118 </span>    <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;scenario &quot;</span> &lt;&lt; result<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot; has an unbalanced '['</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span>
+<span id="L118" class="LineNr">118 </span>    <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;scenario &quot;</span> &lt;&lt; result<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot; has an unbalanced '['</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
 <span id="L119" class="LineNr">119 </span>    result<span class="Delimiter">.</span><a href='050scenario.cc.html#L60'>clear</a><span class="Delimiter">();</span>
 <span id="L120" class="LineNr">120 </span>    <span class="Identifier">return</span> result<span class="Delimiter">;</span>
 <span id="L121" class="LineNr">121 </span>  <span class="Delimiter">}</span>
@@ -291,13 +291,13 @@ if ('onhashchange' in window) {
 <span id="L226" class="LineNr">226 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>!trace_contains_errors<span class="Delimiter">())</span>
 <span id="L227" class="LineNr">227 </span>    run<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>front<span class="Delimiter">());</span>
 <span id="L228" class="LineNr">228 </span>  <span class="Comment">// End Mu Test Teardown</span>
-<span id="L229" class="LineNr">229 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>!Hide_errors &amp;&amp; <a href='003trace.cc.html#L188'>trace_contains_errors</a><span class="Delimiter">()</span> &amp;&amp; !Scenario_testing_scenario<span class="Delimiter">)</span>
+<span id="L229" class="LineNr">229 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>!Hide_errors &amp;&amp; <a href='003trace.cc.html#L180'>trace_contains_errors</a><span class="Delimiter">()</span> &amp;&amp; !Scenario_testing_scenario<span class="Delimiter">)</span>
 <span id="L230" class="LineNr">230 </span>    Passed = <span class="Constant">false</span><span class="Delimiter">;</span>
 <span id="L231" class="LineNr">231 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>not_already_inside_test &amp;&amp; Trace_stream<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L232" class="LineNr">232 </span>    <a href='000organization.cc.html#L138'>teardown</a><span class="Delimiter">();</span>
 <span id="L233" class="LineNr">233 </span>    <span class="Normal">if</span> <span class="Delimiter">(</span>Save_trace<span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L234" class="LineNr">234 </span>      ofstream fout<span class="Delimiter">(</span><span class="Constant">&quot;last_trace&quot;</span><span class="Delimiter">);</span>
-<span id="L235" class="LineNr">235 </span>      fout &lt;&lt; Trace_stream<span class="Delimiter">-&gt;</span><a href='003trace.cc.html#L151'>readable_contents</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
+<span id="L235" class="LineNr">235 </span>      fout &lt;&lt; Trace_stream<span class="Delimiter">-&gt;</span><a href='003trace.cc.html#L143'>readable_contents</a><span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
 <span id="L236" class="LineNr">236 </span>      fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span>
 <span id="L237" class="LineNr">237 </span>    <span class="Delimiter">}</span>
 <span id="L238" class="LineNr">238 </span>    <span class="Normal">delete</span> Trace_stream<span class="Delimiter">;</span>
@@ -350,7 +350,7 @@ if ('onhashchange' in window) {
 <span id="L285" class="LineNr">285 </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>
 <span id="L286" class="LineNr">286 </span>  <a href='012transform.cc.html#L46'>transform_all</a><span class="Delimiter">();</span>
 <span id="L287" class="LineNr">287 </span>  run<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">));</span>
-<span id="L288" class="LineNr">288 </span>  <a href='003trace.cc.html#L229'>CHECK_TRACE_DOESNT_CONTAIN_ERRORS</a><span class="Delimiter">();</span>
+<span id="L288" class="LineNr">288 </span>  <a href='003trace.cc.html#L221'>CHECK_TRACE_DOESNT_CONTAIN_ERRORS</a><span class="Delimiter">();</span>
 <span id="L289" class="LineNr">289 </span><span class="Delimiter">}</span>
 <span id="L290" class="LineNr">290 </span>
 <span id="L291" class="LineNr">291 </span><span class="Comment">//: Watch out for redefinitions of scenario routines. We should never ever be</span>
@@ -467,7 +467,7 @@ if ('onhashchange' in window) {
 <span id="L402" class="LineNr">402 </span>    string lhs = <a href='011load.cc.html#L167'>next_word</a><span class="Delimiter">(</span>in<span class="Delimiter">);</span>
 <span id="L403" class="LineNr">403 </span>    <span class="Normal">if</span> <span class="Delimiter">(</span>lhs<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span>
 <span id="L404" class="LineNr">404 </span>      assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span>
-<span id="L405" class="LineNr">405 </span>      <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;incomplete 'memory-should-contain' block at <a href='003trace.cc.html#L193'>end</a> of file (0)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span>
+<span id="L405" class="LineNr">405 </span>      <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;incomplete 'memory-should-contain' block at <a href='003trace.cc.html#L185'>end</a> of file (0)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span>
 <span id="L406" class="LineNr">406 </span>      <span class="Identifier">return</span><span class="Delimiter">;</span>
 <span id="L407" class="LineNr">407 </span>    <span class="Delimiter">}</span>
 <span id="L408" class="LineNr">408 </span>    <span class="Norm
# tests for 'scenario' in previous layer

scenario first_scenario_in_mu [
  run [
    10:num <- add 2, 2
  ]
  memory-should-contain [
    10 <- 4
  ]
]

scenario scenario_with_comment_in_mu [
  run [
    # comment
    10:num <- add 2, 2
  ]
  memory-should-contain [
    10 <- 4
  ]
]

scenario scenario_with_multiple_comments_in_mu [
  run [
    # comment1
    # comment2
    10:num <- add 2, 2
  ]
  memory-should-contain [
    10 <- 4
  ]
]

scenario check_text_in_memory [
  run [
    10:num <- copy 3
    11:char <- copy 97  # 'a'
    12:char <- copy 98  # 'b'
    13:char <- copy 99  # 'c'
  ]
  memory-should-contain [
    10:array:character <- [abc]
  ]
]

scenario check_trace [
  run [
    10:num <- add 2, 2
  ]
  trace-should-contain [
    mem: storing 4 in location 10
  ]
]

scenario check_trace_negative [
  run [
    10:num <- add 2, 2
  ]
  trace-should-not-contain [
    mem: storing 3 in location 10
  ]
]

scenario check_trace_instruction [
  run [
    trace 1, [foo], [aaa]
  ]
  trace-should-contain [
    foo: aaa
  ]
]
span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span>
+<span id="L443" class="LineNr">443 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;expected location '&quot;</span> &lt;&lt; address &lt;&lt; <span class="Constant">&quot;' to contain &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span>value<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; but saw &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">))</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L444" class="LineNr">444 </span> <span class="Delimiter">}</span> <span id="L445" class="LineNr">445 </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> <span id="L446" class="LineNr">446 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> @@ -522,7 +522,7 @@ if ('onhashchange' in window) { <span id="L457" class="LineNr">457 </span> string _assign = <a href='011load.cc.html#L167'>next_word</a><span class="Delimiter">(</span>in<span class="Delimiter">);</span> <span id="L458" class="LineNr">458 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>_assign<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> <span id="L459" class="LineNr">459 </span> assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> -<span id="L460" class="LineNr">460 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;incomplete 'memory-should-contain' block at <a href='003trace.cc.html#L193'>end</a> of file (2)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L460" class="LineNr">460 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;incomplete 'memory-should-contain' block at <a href='003trace.cc.html#L185'>end</a> of file (2)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L461" class="LineNr">461 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L462" class="LineNr">462 </span> <span class="Delimiter">}</span> <span id="L463" class="LineNr">463 </span> assert<span class="Delimiter">(</span>_assign == <span class="Constant">&quot;&lt;-&quot;</span><span class="Delimiter">);</span> @@ -530,41 +530,41 @@ if ('onhashchange' in window) { <span id="L465" class="LineNr">465 </span> string literal = <a href='011load.cc.html#L167'>next_word</a><span class="Delimiter">(</span>in<span class="Delimiter">);</span> <span id="L466" class="LineNr">466 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>literal<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> <span id="L467" class="LineNr">467 </span> assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> -<span id="L468" class="LineNr">468 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;incomplete 'memory-should-contain' block at <a href='003trace.cc.html#L193'>end</a> of file (3)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L468" class="LineNr">468 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;incomplete 'memory-should-contain' block at <a href='003trace.cc.html#L185'>end</a> of file (3)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L469" class="LineNr">469 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L470" class="LineNr">470 </span> <span class="Delimiter">}</span> <span id="L471" class="LineNr">471 </span> <span class="Normal">int</span> <a href='043space.cc.html#L76'>address</a> = x<span class="Delimiter">.</span>value<span class="Delimiter">;</span> <span id="L472" class="LineNr">472 </span> <span class="Comment">// exclude quoting brackets</span> <span id="L473" class="LineNr">473 </span> assert<span class="Delimiter">(</span>*literal<span class="Delimiter">.</span>begin<span class="Delimiter">()</span> == <span class="Constant">'['</span><span class="Delimiter">);</span> literal<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>literal<span class="Delimiter">.</span>begin<span class="Delimiter">());</span> -<span id="L474" class="LineNr">474 </span> assert<span class="Delimiter">(</span>*--literal<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">()</span> == <span class="Constant">']'</span><span class="Delimiter">);</span> literal<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>--literal<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">());</span> +<span id="L474" class="LineNr">474 </span> assert<span class="Delimiter">(</span>*--literal<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">()</span> == <span class="Constant">']'</span><span class="Delimiter">);</span> literal<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>--literal<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">());</span> <span id="L475" class="LineNr">475 </span> check_string<span class="Delimiter">(</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">,</span> literal<span class="Delimiter">);</span> <span id="L476" class="LineNr">476 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L477" class="LineNr">477 </span> <span class="Delimiter">}</span> <span id="L478" class="LineNr">478 </span> <span class="Comment">// End Scenario Type Special-cases</span> -<span id="L479" class="LineNr">479 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;don't know how to check memory for '&quot;</span> &lt;&lt; lhs &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span> +<span id="L479" class="LineNr">479 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;don't know how to check memory for '&quot;</span> &lt;&lt; lhs &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span> <span id="L480" class="LineNr">480 </span><span class="Delimiter">}</span> <span id="L481" class="LineNr">481 </span> <span id="L482" class="LineNr">482 </span><span class="Normal">void</span> check_string<span class="Delimiter">(</span><span class="Normal">int</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">,</span> <span class="Normal">const</span> string&amp; literal<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L483" class="LineNr">483 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;checking string length at &quot;</span> &lt;&lt; <a href='043space.cc.html#L76'>address</a> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L483" class="LineNr">483 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;checking string length at &quot;</span> &lt;&lt; <a href='043space.cc.html#L76'>address</a> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L484" class="LineNr">484 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">)</span> != <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>literal<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L485" class="LineNr">485 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Current_scenario &amp;&amp; !Scenario_testing_scenario<span class="Delimiter">)</span> -<span id="L486" class="LineNr">486 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: expected location '&quot;</span> &lt;&lt; address &lt;&lt; <span class="Constant">&quot;' to contain length &quot;</span> &lt;&lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>literal<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; of string [&quot;</span> &lt;&lt; literal &lt;&lt; <span class="Constant">&quot;] but saw &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">))</span> &lt;&lt; <span class="Constant">&quot; (&quot;</span> &lt;&lt; <a href='038new_text.cc.html#L143'>read_mu_text</a><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> &lt;&lt; <span class="Constant">&quot;)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L486" class="LineNr">486 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: expected location '&quot;</span> &lt;&lt; address &lt;&lt; <span class="Constant">&quot;' to contain length &quot;</span> &lt;&lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>literal<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; of string [&quot;</span> &lt;&lt; literal &lt;&lt; <span class="Constant">&quot;] but saw &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">))</span> &lt;&lt; <span class="Constant">&quot; (&quot;</span> &lt;&lt; <a href='038new_text.cc.html#L143'>read_mu_text</a><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> &lt;&lt; <span class="Constant">&quot;)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L487" class="LineNr">487 </span> <span class="Normal">else</span> -<span id="L488" class="LineNr">488 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;expected location '&quot;</span> &lt;&lt; address &lt;&lt; <span class="Constant">&quot;' to contain length &quot;</span> &lt;&lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>literal<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; of string [&quot;</span> &lt;&lt; literal &lt;&lt; <span class="Constant">&quot;] but saw &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">))</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L488" class="LineNr">488 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;expected location '&quot;</span> &lt;&lt; address &lt;&lt; <span class="Constant">&quot;' to contain length &quot;</span> &lt;&lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>literal<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; of string [&quot;</span> &lt;&lt; literal &lt;&lt; <span class="Constant">&quot;] but saw &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">))</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L489" class="LineNr">489 </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> <span id="L490" class="LineNr">490 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L491" class="LineNr">491 </span> <span class="Delimiter">}</span> <span id="L492" class="LineNr">492 </span> ++address<span class="Delimiter">;</span> <span class="Comment">// now skip length</span> <span id="L493" class="LineNr">493 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>literal<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L494" class="LineNr">494 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;checking location &quot;</span> &lt;&lt; address+i &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L494" class="LineNr">494 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;checking location &quot;</span> &lt;&lt; address+i &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L495" class="LineNr">495 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address+i<span class="Delimiter">)</span> != literal<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L496" class="LineNr">496 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Current_scenario &amp;&amp; !Scenario_testing_scenario<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L497" class="LineNr">497 </span> <span class="Comment">// genuine test in a .mu file</span> -<span id="L498" class="LineNr">498 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: expected location &quot;</span> &lt;&lt; <span class="Delimiter">(</span>address+i<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; to contain &quot;</span> &lt;&lt; literal<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; but saw &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address+i<span class="Delimiter">))</span> &lt;&lt; <span class="Constant">&quot; ('&quot;</span> &lt;&lt; <span class="Normal">static_cast</span>&lt;<span class="Normal">char</span>&gt;<span class="Delimiter">(</span>get_or_insert<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address+i<span class="Delimiter">))</span> &lt;&lt; <span class="Constant">&quot;')</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L498" class="LineNr">498 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: expected location &quot;</span> &lt;&lt; <span class="Delimiter">(</span>address+i<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; to contain &quot;</span> &lt;&lt; literal<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; but saw &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address+i<span class="Delimiter">))</span> &lt;&lt; <span class="Constant">&quot; ('&quot;</span> &lt;&lt; <span class="Normal">static_cast</span>&lt;<span class="Normal">char</span>&gt;<span class="Delimiter">(</span>get_or_insert<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address+i<span class="Delimiter">))</span> &lt;&lt; <span class="Constant">&quot;')</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L499" class="LineNr">499 </span> <span class="Delimiter">}</span> <span id="L500" class="LineNr">500 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> <span id="L501" class="LineNr">501 </span> <span class="Comment">// just testing scenario support</span> -<span id="L502" class="LineNr">502 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;expected location &quot;</span> &lt;&lt; <span class="Delimiter">(</span>address+i<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; to contain &quot;</span> &lt;&lt; literal<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; but saw &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address+i<span class="Delimiter">))</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L502" class="LineNr">502 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;expected location &quot;</span> &lt;&lt; <span class="Delimiter">(</span>address+i<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; to contain &quot;</span> &lt;&lt; literal<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; but saw &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address+i<span class="Delimiter">))</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L503" class="LineNr">503 </span> <span class="Delimiter">}</span> <span id="L504" class="LineNr">504 </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> <span id="L505" class="LineNr">505 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> @@ -647,7 +647,7 @@ if ('onhashchange' in window) { <span id="L582" class="LineNr">582 </span> <span class="Normal">a</span>: d <span id="L583" class="LineNr">583 </span> ] <span id="L584" class="LineNr">584 </span>] -<span id="L585" class="LineNr">585 </span><span class="traceContains">+error: missing [b] in <a href='003trace.cc.html#L169'>trace</a> with label 'a'</span> +<span id="L585" class="LineNr">585 </span><span class="traceContains">+error: missing [b] in <a href='003trace.cc.html#L161'>trace</a> with label 'a'</span> <span id="L586" class="LineNr">586 </span> <span id="L587" class="LineNr">587 </span><span class="Delimiter">:(before &quot;End Primitive Recipe Declarations&quot;)</span> <span id="L588" class="LineNr">588 </span>TRACE_SHOULD_CONTAIN<span class="Delimiter">,</span> @@ -668,41 +668,41 @@ if ('onhashchange' in window) { <span id="L603" class="LineNr">603 </span><span class="Comment">// simplified version of check_trace_contents() that emits errors rather</span> <span id="L604" class="LineNr">604 </span><span class="Comment">// than just printing to stderr</span> <span id="L605" class="LineNr">605 </span><span class="Normal">void</span> check_trace<span class="Delimiter">(</span><span class="Normal">const</span> string&amp; expected<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L606" class="LineNr">606 </span> Trace_stream<span class="Delimiter">-&gt;</span><a href='003trace.cc.html#L135'>newline</a><span class="Delimiter">();</span> +<span id="L606" class="LineNr">606 </span> Trace_stream<span class="Delimiter">-&gt;</span><a href='003trace.cc.html#L127'>newline</a><span class="Delimiter">();</span> <span id="L607" class="LineNr">607 </span> vector&lt;trace_line&gt; expected_lines = parse_trace<span class="Delimiter">(</span>expected<span class="Delimiter">);</span> <span id="L608" class="LineNr">608 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L609" class="LineNr">609 </span> <span class="Normal">int</span> curr_expected_line = <span class="Constant">0</span><span class="Delimiter">;</span> -<span id="L610" class="LineNr">610 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>vector&lt;trace_line&gt;::iterator p = Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L610" class="LineNr">610 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>vector&lt;trace_line&gt;::iterator p = Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Trace_stream<span class="Delimiter">-&gt;</span>past_lines<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L611" class="LineNr">611 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>label != p<span class="Delimiter">-&gt;</span>label<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L612" class="LineNr">612 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>contents != <a href='003trace.cc.html#L363'>trim</a><span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>contents<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> +<span id="L612" class="LineNr">612 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>contents != <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>contents<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span id="L613" class="LineNr">613 </span> <span class="Comment">// match</span> <span id="L614" class="LineNr">614 </span> ++curr_expected_line<span class="Delimiter">;</span> <span id="L615" class="LineNr">615 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>curr_expected_line == <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L616" class="LineNr">616 </span> <span class="Delimiter">}</span> <span id="L617" class="LineNr">617 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Current_scenario &amp;&amp; !Scenario_testing_scenario<span class="Delimiter">)</span> -<span id="L618" class="LineNr">618 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: missing [&quot;</span> &lt;&lt; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>contents &lt;&lt; <span class="Constant">&quot;] &quot;</span> -<span id="L619" class="LineNr">619 </span> &lt;&lt; <span class="Constant">&quot;in <a href='003trace.cc.html#L169'>trace</a> with label '&quot;</span> &lt;&lt; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>label &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L618" class="LineNr">618 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: missing [&quot;</span> &lt;&lt; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>contents &lt;&lt; <span class="Constant">&quot;] &quot;</span> +<span id="L619" class="LineNr">619 </span> &lt;&lt; <span class="Constant">&quot;in <a href='003trace.cc.html#L161'>trace</a> with label '&quot;</span> &lt;&lt; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>label &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L620" class="LineNr">620 </span> <span class="Normal">else</span> -<span id="L621" class="LineNr">621 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;missing [&quot;</span> &lt;&lt; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>contents &lt;&lt; <span class="Constant">&quot;] &quot;</span> -<span id="L622" class="LineNr">622 </span> &lt;&lt; <span class="Constant">&quot;in <a href='003trace.cc.html#L169'>trace</a> with label '&quot;</span> &lt;&lt; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>label &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L621" class="LineNr">621 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;missing [&quot;</span> &lt;&lt; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>contents &lt;&lt; <span class="Constant">&quot;] &quot;</span> +<span id="L622" class="LineNr">622 </span> &lt;&lt; <span class="Constant">&quot;in <a href='003trace.cc.html#L161'>trace</a> with label '&quot;</span> &lt;&lt; expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>label &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L623" class="LineNr">623 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!Hide_errors<span class="Delimiter">)</span> -<span id="L624" class="LineNr">624 </span> <a href='003trace.cc.html#L173'>DUMP</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>label<span class="Delimiter">);</span> +<span id="L624" class="LineNr">624 </span> <a href='003trace.cc.html#L165'>DUMP</a><span class="Delimiter">(</span>expected_lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>curr_expected_line<span class="Delimiter">).</span>label<span class="Delimiter">);</span> <span id="L625" class="LineNr">625 </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> <span id="L626" class="LineNr">626 </span><span class="Delimiter">}</span> <span id="L627" class="LineNr">627 </span> <span id="L628" class="LineNr">628 </span>vector&lt;trace_line&gt; parse_trace<span class="Delimiter">(</span><span class="Normal">const</span> string&amp; expected<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L629" class="LineNr">629 </span> vector&lt;string&gt; buf = <a href='003trace.cc.html#L339'>split</a><span class="Delimiter">(</span>expected<span class="Delimiter">,</span> <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">);</span> +<span id="L629" class="LineNr">629 </span> vector&lt;string&gt; buf = <a href='003trace.cc.html#L331'>split</a><span class="Delimiter">(</span>expected<span class="Delimiter">,</span> <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">);</span> <span id="L630" class="LineNr">630 </span> vector&lt;trace_line&gt; result<span class="Delimiter">;</span> <span id="L631" class="LineNr">631 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>buf<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L632" class="LineNr">632 </span> buf<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)</span> = <a href='003trace.cc.html#L363'>trim</a><span class="Delimiter">(</span>buf<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> +<span id="L632" class="LineNr">632 </span> buf<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)</span> = <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>buf<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> <span id="L633" class="LineNr">633 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>buf<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>empty<span class="Delimiter">())</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span id="L634" class="LineNr">634 </span> <span class="Normal">int</span> delim = buf<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>find<span class="Delimiter">(</span><span class="Constant">&quot;: &quot;</span><span class="Delimiter">);</span> <span id="L635" class="LineNr">635 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>delim == -<span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L636" class="LineNr">636 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: lines in 'trace-should-contain' should be of the form &lt;label&gt;: &lt;contents&gt;. Both parts are required.</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L636" class="LineNr">636 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: lines in 'trace-should-contain' should be of the form &lt;label&gt;: &lt;contents&gt;. Both parts are required.</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L637" class="LineNr">637 </span> result<span class="Delimiter">.</span><a href='050scenario.cc.html#L60'>clear</a><span class="Delimiter">();</span> <span id="L638" class="LineNr">638 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span id="L639" class="LineNr">639 </span> <span class="Delimiter">}</span> -<span id="L640" class="LineNr">640 </span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>trace_line<span class="Delimiter">(</span><a href='003trace.cc.html#L363'>trim</a><span class="Delimiter">(</span>buf<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>substr<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> delim<span class="Delimiter">)),</span> <a href='003trace.cc.html#L363'>trim</a><span class="Delimiter">(</span>buf<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>substr<span class="Delimiter">(</span>delim+<span class="Constant">2</span><span class="Delimiter">))));</span> +<span id="L640" class="LineNr">640 </span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>trace_line<span class="Delimiter">(</span><a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>buf<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>substr<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> delim<span class="Delimiter">)),</span> <a href='003trace.cc.html#L355'>trim</a><span class="Delimiter">(</span>buf<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>substr<span class="Delimiter">(</span>delim+<span class="Constant">2</span><span class="Delimiter">))));</span> <span id="L641" class="LineNr">641 </span> <span class="Delimiter">}</span> <span id="L642" class="LineNr">642 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span id="L643" class="LineNr">643 </span><span class="Delimiter">}</span> @@ -712,26 +712,26 @@ if ('onhashchange' in window) { <span id="L647" class="LineNr">647 </span><span class="Special">% Hide_errors = true;</span> <span id="L648" class="LineNr">648 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ <span id="L649" class="LineNr">649 </span> run [ -<span id="L650" class="LineNr">650 </span> <a href='003trace.cc.html#L169'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [b] +<span id="L650" class="LineNr">650 </span> <a href='003trace.cc.html#L161'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [b] <span id="L651" class="LineNr">651 </span> ] <span id="L652" class="LineNr">652 </span> trace-should-contain [ <span id="L653" class="LineNr">653 </span> <span class="Normal">a</span>: b <span id="L654" class="LineNr">654 </span> <span class="Normal">a</span>: d <span id="L655" class="LineNr">655 </span> ] <span id="L656" class="LineNr">656 </span>] -<span id="L657" class="LineNr">657 </span><span class="traceContains">+error: missing [d] in <a href='003trace.cc.html#L169'>trace</a> with label 'a'</span> +<span id="L657" class="LineNr">657 </span><span class="traceContains">+error: missing [d] in <a href='003trace.cc.html#L161'>trace</a> with label 'a'</span> <span id="L658" class="LineNr">658 </span> <span id="L659" class="LineNr">659 </span><span class="Delimiter">:(scenario trace_check_passes_silently)</span> <span id="L660" class="LineNr">660 </span><span class="Special">% Scenario_testing_scenario = true;</span> <span id="L661" class="LineNr">661 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ <span id="L662" class="LineNr">662 </span> run [ -<span id="L663" class="LineNr">663 </span> <a href='003trace.cc.html#L169'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [b] +<span id="L663" class="LineNr">663 </span> <a href='003trace.cc.html#L161'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [b] <span id="L664" class="LineNr">664 </span> ] <span id="L665" class="LineNr">665 </span> trace-should-contain [ <span id="L666" class="LineNr">666 </span> <span class="Normal">a</span>: b <span id="L667" class="LineNr">667 </span> ] <span id="L668" class="LineNr">668 </span>] -<span id="L669" class="LineNr">669 </span><span class="traceAbsent">-error: missing [b] in <a href='003trace.cc.html#L169'>trace</a> with label 'a'</span> +<span id="L669" class="LineNr">669 </span><span class="traceAbsent">-error: missing [b] in <a href='003trace.cc.html#L161'>trace</a> with label 'a'</span> <span id="L670" class="LineNr">670 </span>$error: <span class="Constant">0</span> <span id="L671" class="LineNr">671 </span> <span id="L672" class="LineNr">672 </span><span class="Comment">//: 'trace-should-not-contain' is like the '-' lines in our scenarios so far</span> @@ -743,13 +743,13 @@ if ('onhashchange' in window) { <span id="L678" class="LineNr">678 </span><span class="Special">% Hide_errors = true;</span> <span id="L679" class="LineNr">679 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ <span id="L680" class="LineNr">680 </span> run [ -<span id="L681" class="LineNr">681 </span> <a href='003trace.cc.html#L169'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [b] +<span id="L681" class="LineNr">681 </span> <a href='003trace.cc.html#L161'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [b] <span id="L682" class="LineNr">682 </span> ] <span id="L683" class="LineNr">683 </span> trace-should-<span class="Normal">not</span>-contain [ <span id="L684" class="LineNr">684 </span> <span class="Normal">a</span>: b <span id="L685" class="LineNr">685 </span> ] <span id="L686" class="LineNr">686 </span>] -<span id="L687" class="LineNr">687 </span><span class="traceContains">+error: unexpected [b] in <a href='003trace.cc.html#L169'>trace</a> with label 'a'</span> +<span id="L687" class="LineNr">687 </span><span class="traceContains">+error: unexpected [b] in <a href='003trace.cc.html#L161'>trace</a> with label 'a'</span> <span id="L688" class="LineNr">688 </span> <span id="L689" class="LineNr">689 </span><span class="Delimiter">:(before &quot;End Primitive Recipe Declarations&quot;)</span> <span id="L690" class="LineNr">690 </span>TRACE_SHOULD_NOT_CONTAIN<span class="Delimiter">,</span> @@ -770,11 +770,11 @@ if ('onhashchange' in window) { <span id="L705" class="LineNr">705 </span><span class="Comment">// simplified version of check_trace_contents() that emits errors rather</span> <span id="L706" class="LineNr">706 </span><span class="Comment">// than just printing to stderr</span> <span id="L707" class="LineNr">707 </span><span class="Normal">bool</span> check_trace_missing<span class="Delimiter">(</span><span class="Normal">const</span> string&amp; in<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L708" class="LineNr">708 </span> Trace_stream<span class="Delimiter">-&gt;</span><a href='003trace.cc.html#L135'>newline</a><span class="Delimiter">();</span> +<span id="L708" class="LineNr">708 </span> Trace_stream<span class="Delimiter">-&gt;</span><a href='003trace.cc.html#L127'>newline</a><span class="Delimiter">();</span> <span id="L709" class="LineNr">709 </span> vector&lt;trace_line&gt; lines = parse_trace<span class="Delimiter">(</span>in<span class="Delimiter">);</span> <span id="L710" class="LineNr">710 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>lines<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L711" class="LineNr">711 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>trace_count<span class="Delimiter">(</span>lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>label<span class="Delimiter">,</span> lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>contents<span class="Delimiter">)</span> != <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L712" class="LineNr">712 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;unexpected [&quot;</span> &lt;&lt; lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>contents &lt;&lt; <span class="Constant">&quot;] in <a href='003trace.cc.html#L169'>trace</a> with label '&quot;</span> &lt;&lt; lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>label &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L712" class="LineNr">712 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;unexpected [&quot;</span> &lt;&lt; lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>contents &lt;&lt; <span class="Constant">&quot;] in <a href='003trace.cc.html#L161'>trace</a> with label '&quot;</span> &lt;&lt; lines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>label &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L713" class="LineNr">713 </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> <span id="L714" class="LineNr">714 </span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L715" class="LineNr">715 </span> <span class="Delimiter">}</span> @@ -789,7 +789,7 @@ if ('onhashchange' in window) { <span id="L724" class="LineNr">724 </span> <span class="Normal">a</span>: b <span id="L725" class="LineNr">725 </span> ] <span id="L726" class="LineNr">726 </span>] -<span id="L727" class="LineNr">727 </span><span class="traceAbsent">-error: unexpected [b] in <a href='003trace.cc.html#L169'>trace</a> with label 'a'</span> +<span id="L727" class="LineNr">727 </span><span class="traceAbsent">-error: unexpected [b] in <a href='003trace.cc.html#L161'>trace</a> with label 'a'</span> <span id="L728" class="LineNr">728 </span>$error: <span class="Constant">0</span> <span id="L729" class="LineNr">729 </span> <span id="L730" class="LineNr">730 </span><span class="Delimiter">:(scenario trace_negative_check_fails_on_any_unexpected_line)</span> @@ -797,19 +797,19 @@ if ('onhashchange' in window) { <span id="L732" class="LineNr">732 </span><span class="Special">% Hide_errors = true;</span> <span id="L733" class="LineNr">733 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ <span id="L734" class="LineNr">734 </span> run [ -<span id="L735" class="LineNr">735 </span> <a href='003trace.cc.html#L169'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [d] +<span id="L735" class="LineNr">735 </span> <a href='003trace.cc.html#L161'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [d] <span id="L736" class="LineNr">736 </span> ] <span id="L737" class="LineNr">737 </span> trace-should-<span class="Normal">not</span>-contain [ <span id="L738" class="LineNr">738 </span> <span class="Normal">a</span>: b <span id="L739" class="LineNr">739 </span> <span class="Normal">a</span>: d <span id="L740" class="LineNr">740 </span> ] <span id="L741" class="LineNr">741 </span>] -<span id="L742" class="LineNr">742 </span><span class="traceContains">+error: unexpected [d] in <a href='003trace.cc.html#L169'>trace</a> with label 'a'</span> +<span id="L742" class="LineNr">742 </span><span class="traceContains">+error: unexpected [d] in <a href='003trace.cc.html#L161'>trace</a> with label 'a'</span> <span id="L743" class="LineNr">743 </span> <span id="L744" class="LineNr">744 </span><span class="Delimiter">:(scenario trace_count_check)</span> <span id="L745" class="LineNr">745 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ <span id="L746" class="LineNr">746 </span> run [ -<span id="L747" class="LineNr">747 </span> <a href='003trace.cc.html#L169'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [foo] +<span id="L747" class="LineNr">747 </span> <a href='003trace.cc.html#L161'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [foo] <span id="L748" class="LineNr">748 </span> ] <span id="L749" class="LineNr">749 </span> check-trace-count-<span class="Normal">for</span>-label <span class="Constant">1</span><span class="Delimiter">,</span> [a] <span id="L750" class="LineNr">750 </span>] @@ -822,15 +822,15 @@ if ('onhashchange' in window) { <span id="L757" class="LineNr">757 </span><span class="Delimiter">:(before &quot;End Primitive Recipe Checks&quot;)</span> <span id="L758" class="LineNr">758 </span><span class="Normal">case</span> CHECK_TRACE_COUNT_FOR_LABEL: <span class="Delimiter">{</span> <span id="L759" class="LineNr">759 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">2</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L760" class="LineNr">760 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;'check-trace-count-for-label' requires exactly two ingredients, but got '&quot;</span> &lt;&lt; inst<span class="Delimiter">.</span>original_string &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L760" class="LineNr">760 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;'check-trace-count-for-label' requires exactly two ingredients, but got '&quot;</span> &lt;&lt; inst<span class="Delimiter">.</span>original_string &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L761" class="LineNr">761 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L762" class="LineNr">762 </span> <span class="Delimiter">}</span> <span id="L763" class="LineNr">763 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_number<span class="Delimiter">(</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> <span class="Delimiter">{</span> -<span id="L764" class="LineNr">764 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;first ingredient of 'check-trace-count-for-label' should be a number (count), but got '&quot;</span> &lt;&lt; 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 &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L764" class="LineNr">764 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;first ingredient of 'check-trace-count-for-label' should be a number (count), but got '&quot;</span> &lt;&lt; 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 &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L765" class="LineNr">765 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L766" class="LineNr">766 </span> <span class="Delimiter">}</span> <span id="L767" class="LineNr">767 </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> -<span id="L768" class="LineNr">768 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;second ingredient of 'check-trace-count-for-label' should be a literal string (label), but got '&quot;</span> &lt;&lt; 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 &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L768" class="LineNr">768 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;second ingredient of 'check-trace-count-for-label' should be a literal string (label), but got '&quot;</span> &lt;&lt; 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 &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L769" class="LineNr">769 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L770" class="LineNr">770 </span> <span class="Delimiter">}</span> <span id="L771" class="LineNr">771 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -844,12 +844,12 @@ if ('onhashchange' in window) { <span id="L779" class="LineNr">779 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>count != expected_count<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L780" class="LineNr">780 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Current_scenario &amp;&amp; !Scenario_testing_scenario<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L781" class="LineNr">781 </span> <span class="Comment">// genuine test in a .mu file</span> -<span id="L782" class="LineNr">782 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> &lt;&lt; <span class="Constant">&quot;expected &quot;</span> &lt;&lt; expected_count &lt;&lt; <span class="Constant">&quot; lines in <a href='003trace.cc.html#L169'>trace</a> with label '&quot;</span> &lt;&lt; label &lt;&lt; <span class="Constant">&quot;' in <a href='003trace.cc.html#L169'>trace</a>: &quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> -<span id="L783" class="LineNr">783 </span> <a href='003trace.cc.html#L173'>DUMP</a><span class="Delimiter">(</span>label<span class="Delimiter">);</span> +<span id="L782" class="LineNr">782 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;</span><span class="cSpecial">\n</span><span class="Constant">F - &quot;</span> &lt;&lt; Current_scenario<span class="Delimiter">-&gt;</span>name &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> &lt;&lt; <span class="Constant">&quot;expected &quot;</span> &lt;&lt; expected_count &lt;&lt; <span class="Constant">&quot; lines in <a href='003trace.cc.html#L161'>trace</a> with label '&quot;</span> &lt;&lt; label &lt;&lt; <span class="Constant">&quot;' in <a href='003trace.cc.html#L161'>trace</a>: &quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L783" class="LineNr">783 </span> <a href='003trace.cc.html#L165'>DUMP</a><span class="Delimiter">(</span>label<span class="Delimiter">);</span> <span id="L784" class="LineNr">784 </span> <span class="Delimiter">}</span> <span id="L785" class="LineNr">785 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> <span id="L786" class="LineNr">786 </span> <span class="Comment">// just testing scenario support</span> -<span id="L787" class="LineNr">787 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> &lt;&lt; <span class="Constant">&quot;expected &quot;</span> &lt;&lt; expected_count &lt;&lt; <span class="Constant">&quot; lines in <a href='003trace.cc.html#L169'>trace</a> with label '&quot;</span> &lt;&lt; label &lt;&lt; <span class="Constant">&quot;' in <a href='003trace.cc.html#L169'>trace</a></span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L787" class="LineNr">787 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> &lt;&lt; <span class="Constant">&quot;expected &quot;</span> &lt;&lt; expected_count &lt;&lt; <span class="Constant">&quot; lines in <a href='003trace.cc.html#L161'>trace</a> with label '&quot;</span> &lt;&lt; label &lt;&lt; <span class="Constant">&quot;' in <a href='003trace.cc.html#L161'>trace</a></span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L788" class="LineNr">788 </span> <span class="Delimiter">}</span> <span id="L789" class="LineNr">789 </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> <span id="L790" class="LineNr">790 </span> <span class="Delimiter">}</span> @@ -861,11 +861,11 @@ if ('onhashchange' in window) { <span id="L796" class="LineNr">796 </span><span class="Special">% Hide_errors = true;</span> <span id="L797" class="LineNr">797 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ <span id="L798" class="LineNr">798 </span> run [ -<span id="L799" class="LineNr">799 </span> <a href='003trace.cc.html#L169'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [foo] +<span id="L799" class="LineNr">799 </span> <a href='003trace.cc.html#L161'>trace</a> <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [foo] <span id="L800" class="LineNr">800 </span> ] <span id="L801" class="LineNr">801 </span> check-trace-count-<span class="Normal">for</span>-label <span class="Constant">2</span><span class="Delimiter">,</span> [a] <span id="L802" class="LineNr">802 </span>] -<span id="L803" class="LineNr">803 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: expected 2 lines in <a href='003trace.cc.html#L169'>trace</a> with label 'a' in <a href='003trace.cc.html#L169'>trace</a></span> +<span id="L803" class="LineNr">803 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: expected 2 lines in <a href='003trace.cc.html#L161'>trace</a> with label 'a' in <a href='003trace.cc.html#L161'>trace</a></span> <span id="L804" class="LineNr">804 </span> <span id="L805" class="LineNr">805 </span><span class="Comment">//: Minor detail: ignore 'system' calls in scenarios, since anything we do</span> <span id="L806" class="LineNr">806 </span><span class="Comment">//: with them is by definition impossible to test through Mu.</span> @@ -890,11 +890,11 @@ if ('onhashchange' in window) { <span id="L825" class="LineNr">825 </span><span class="Delimiter">}</span> <span id="L826" class="LineNr">826 </span> <span id="L827" class="LineNr">827 </span><span class="Delimiter">:(after &quot;void transform_all()&quot;)</span> -<span id="L828" class="LineNr">828 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;recipe_ordinal<span class="Delimiter">,</span> recipe&gt;::iterator p = Recipe<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Recipe<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L828" class="LineNr">828 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;recipe_ordinal<span class="Delimiter">,</span> recipe&gt;::iterator p = Recipe<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Recipe<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L829" class="LineNr">829 </span> <span class="Normal">const</span> recipe&amp; r = p<span class="Delimiter">-&gt;</span>second<span class="Delimiter">;</span> <span id="L830" class="LineNr">830 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>r<span class="Delimiter">.</span>name<span class="Delimiter">.</span>find<span class="Delimiter">(</span><span class="Constant">'_'</span><span class="Delimiter">)</span> == string::npos<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span id="L831" class="LineNr">831 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>r<span class="Delimiter">.</span>is_autogenerated<span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Comment">// created by previous call to transform_all()</span> -<span id="L832" class="LineNr">832 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; r<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot;: don't create recipes with '_' in the name</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span> +<span id="L832" class="LineNr">832 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; r<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">&quot;: don't create recipes with '_' in the name</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span> <span id="L833" class="LineNr">833 </span> <span class="Delimiter">}</span> <span id="L834" class="LineNr">834 </span> <span id="L835" class="LineNr">835 </span><span class="SalientComment">//:: Helpers</span> @@ -909,7 +909,7 @@ if ('onhashchange' in window) { <span id="L844" class="LineNr">844 </span> string _scenario = <a href='011load.cc.html#L167'>next_word</a><span class="Delimiter">(</span>in<span class="Delimiter">);</span> <span id="L845" class="LineNr">845 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>_scenario<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> <span id="L846" class="LineNr">846 </span> assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> -<span id="L847" class="LineNr">847 </span> <a href='003trace.cc.html#L176'>raise</a> &lt;&lt; <span class="Constant">&quot;no <a href='050scenario.cc.html#L57'>scenario</a> in string passed into run_mu_scenario()</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L847" class="LineNr">847 </span> <a href='003trace.cc.html#L168'>raise</a> &lt;&lt; <span class="Constant">&quot;no <a href='050scenario.cc.html#L57'>scenario</a> in string passed into run_mu_scenario()</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L848" class="LineNr">848 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L849" class="LineNr">849 </span> <span class="Delimiter">}</span> <span id="L850" class="LineNr">850 </span> assert<span class="Delimiter">(</span>_scenario == <span class="Constant">&quot;scenario&quot;</span><span class="Delimiter">);</span>