about summary refs log blame commit diff stats
path: root/html/027call_ingredient.cc.html
blob: ef710043dc3951306f0eeed6fd29dbbf317c8cff (plain) (tree)
s="p">>;</span> <span class="Delimiter">}</span> <span class="Delimiter">:(scenario trace_count_check_2)</span> <span class="Special">% Scenario_testing_scenario = true;</span> <span class="Special">% Hide_warnings = true;</span> recipe main [ run [ trace <span class="Constant">1</span><span class="Delimiter">,</span> [a]<span class="Delimiter">,</span> [foo] ] check-trace-count-for-label <span class="Constant">2</span><span class="Delimiter">,</span> [a] ] <span class="traceContains">+warn: main: expected 2 lines in trace with label a in trace</span> <span class="Comment">//: Minor detail: ignore 'system' calls in scenarios, since anything we do</span> <span class="Comment">//: with them is by definition impossible to test through mu.</span> <span class="Delimiter">:(after &quot;case _SYSTEM:&quot;)</span> if <span class="Delimiter">(</span>Current_scenario<span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="SalientComment">//:: Helpers</span> <span class="Delimiter">:(code)</span> <span class="Comment">// just for the scenarios running scenarios in C++ layers</span> void run_mu_scenario<span class="Delimiter">(</span>const string&amp; form<span class="Delimiter">)</span> <span class="Delimiter">{</span> Scenario_names<span class="Delimiter">.</span>clear<span class="Delimiter">();</span> istringstream in<span class="Delimiter">(</span>form<span class="Delimiter">);</span> in &gt;&gt; std::noskipws<span class="Delimiter">;</span> skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span> string _scenario = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> assert<span class="Delimiter">(</span>_scenario == <span class="Constant">&quot;scenario&quot;</span><span class="Delimiter">);</span> scenario s = parse_scenario<span class="Delimiter">(</span>in<span class="Delimiter">);</span> run_mu_scenario<span class="Delimiter">(</span>s<span class="Delimiter">);</span> <span class="Delimiter">}</span> </pre> </body> </html> <!-- vim: set foldmethod=manual : -->