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/082scenario_screen.cc.html | |
parent | 897ae8c1855f830d8819759ea327d147f28a09bf (diff) | |
download | mu-f344b250f6f062a1a1902bf69b23ebf9b565de0e.tar.gz |
3395
Diffstat (limited to 'html/082scenario_screen.cc.html')
-rw-r--r-- | html/082scenario_screen.cc.html | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/html/082scenario_screen.cc.html b/html/082scenario_screen.cc.html index f0f10ac5..a59fe566 100644 --- a/html/082scenario_screen.cc.html +++ b/html/082scenario_screen.cc.html @@ -49,8 +49,8 @@ recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class= scenario screen-in-scenario [ assume-screen <span class="Constant">5</span>/width<span class="Delimiter">,</span> <span class="Constant">3</span>/height run [ - <span class="Constant">1</span>:character<span class="Special"> <- </span>copy <span class="Constant">97</span>/a - <span class="Normal">screen</span>:address:screen<span class="Special"> <- </span>print screen:address:screen<span class="Delimiter">,</span> <span class="Constant">1</span>:character/a + <span class="Constant">1</span>:<span class="Normal">char</span><span class="Special"> <- </span>copy <span class="Constant">97</span>/a + <span class="Normal">screen</span>:&:screen<span class="Special"> <- </span>print screen:&:screen<span class="Delimiter">,</span> <span class="Constant">1</span>:<span class="Normal">char</span>/a ] screen-should-contain [ <span class="Comment"># 01234</span> @@ -65,10 +65,10 @@ scenario screen-in-scenario [ scenario screen-in-scenario-unicode-color [ assume-screen <span class="Constant">5</span>/width<span class="Delimiter">,</span> <span class="Constant">3</span>/height run [ - <span class="Constant">1</span>:character<span class="Special"> <- </span>copy <span class="Constant">955</span>/greek-small-lambda - <span class="Normal">screen</span>:address:screen<span class="Special"> <- </span>print screen:address:screen<span class="Delimiter">,</span> <span class="Constant">1</span>:character/lambda<span class="Delimiter">,</span> <span class="Constant">1</span>/red - <span class="Constant">2</span>:character<span class="Special"> <- </span>copy <span class="Constant">97</span>/a - <span class="Normal">screen</span>:address:screen<span class="Special"> <- </span>print screen:address:screen<span class="Delimiter">,</span> <span class="Constant">2</span>:character/a + <span class="Constant">1</span>:<span class="Normal">char</span><span class="Special"> <- </span>copy <span class="Constant">955</span>/greek-small-lambda + <span class="Normal">screen</span>:&:screen<span class="Special"> <- </span>print screen:&:screen<span class="Delimiter">,</span> <span class="Constant">1</span>:<span class="Normal">char</span>/lambda<span class="Delimiter">,</span> <span class="Constant">1</span>/red + <span class="Constant">2</span>:<span class="Normal">char</span><span class="Special"> <- </span>copy <span class="Constant">97</span>/a + <span class="Normal">screen</span>:&:screen<span class="Special"> <- </span>print screen:&:screen<span class="Delimiter">,</span> <span class="Constant">2</span>:<span class="Normal">char</span>/a ] screen-should-contain [ <span class="Comment"># 01234</span> @@ -84,10 +84,10 @@ scenario screen-in-scenario-unicode-color [ scenario screen-in-scenario-color [ assume-screen <span class="Constant">5</span>/width<span class="Delimiter">,</span> <span class="Constant">3</span>/height run [ - <span class="Constant">1</span>:character<span class="Special"> <- </span>copy <span class="Constant">955</span>/greek-small-lambda - <span class="Normal">screen</span>:address:screen<span class="Special"> <- </span>print screen:address:screen<span class="Delimiter">,</span> <span class="Constant">1</span>:character/lambda<span class="Delimiter">,</span> <span class="Constant">1</span>/red - <span class="Constant">2</span>:character<span class="Special"> <- </span>copy <span class="Constant">97</span>/a - <span class="Normal">screen</span>:address:screen<span class="Special"> <- </span>print screen:address:screen<span class="Delimiter">,</span> <span class="Constant">2</span>:character/a<span class="Delimiter">,</span> <span class="Constant">7</span>/white + <span class="Constant">1</span>:<span class="Normal">char</span><span class="Special"> <- </span>copy <span class="Constant">955</span>/greek-small-lambda + <span class="Normal">screen</span>:&:screen<span class="Special"> <- </span>print screen:&:screen<span class="Delimiter">,</span> <span class="Constant">1</span>:<span class="Normal">char</span>/lambda<span class="Delimiter">,</span> <span class="Constant">1</span>/red + <span class="Constant">2</span>:<span class="Normal">char</span><span class="Special"> <- </span>copy <span class="Constant">97</span>/a + <span class="Normal">screen</span>:&:screen<span class="Special"> <- </span>print screen:&:screen<span class="Delimiter">,</span> <span class="Constant">2</span>:<span class="Normal">char</span>/a<span class="Delimiter">,</span> <span class="Constant">7</span>/white ] <span class="Comment"># screen-should-contain shows everything</span> screen-should-contain [ @@ -120,8 +120,8 @@ scenario screen-in-scenario-color [ scenario screen-in-scenario-error [ assume-screen <span class="Constant">5</span>/width<span class="Delimiter">,</span> <span class="Constant">3</span>/height run [ - <span class="Constant">1</span>:character<span class="Special"> <- </span>copy <span class="Constant">97</span>/a - <span class="Normal">screen</span>:address:screen<span class="Special"> <- </span>print screen:address:screen<span class="Delimiter">,</span> <span class="Constant">1</span>:character/a + <span class="Constant">1</span>:<span class="Normal">char</span><span class="Special"> <- </span>copy <span class="Constant">97</span>/a + <span class="Normal">screen</span>:&:screen<span class="Special"> <- </span>print screen:&:screen<span class="Delimiter">,</span> <span class="Constant">1</span>:<span class="Normal">char</span>/a ] screen-should-contain [ <span class="Comment"># 01234</span> @@ -139,8 +139,8 @@ scenario screen-in-scenario-error [ scenario screen-in-scenario-color [ assume-screen <span class="Constant">5</span>/width<span class="Delimiter">,</span> <span class="Constant">3</span>/height run [ - <span class="Constant">1</span>:character<span class="Special"> <- </span>copy <span class="Constant">97</span>/a - <span class="Normal">screen</span>:address:screen<span class="Special"> <- </span>print screen:address:screen<span class="Delimiter">,</span> <span class="Constant">1</span>:character/a<span class="Delimiter">,</span> <span class="Constant">1</span>/red + <span class="Constant">1</span>:<span class="Normal">char</span><span class="Special"> <- </span>copy <span class="Constant">97</span>/a + <span class="Normal">screen</span>:&:screen<span class="Special"> <- </span>print screen:&:screen<span class="Delimiter">,</span> <span class="Constant">1</span>:<span class="Normal">char</span>/a<span class="Delimiter">,</span> <span class="Constant">1</span>/red ] screen-should-contain-in-color <span class="Constant">2</span>/green<span class="Delimiter">,</span> [ <span class="Comment"># 01234</span> @@ -155,7 +155,7 @@ scenario screen-in-scenario-color [ <span class="Delimiter">:(scenario convert_names_does_not_fail_when_mixing_special_names_and_numeric_locations)</span> <span class="Special">% Scenario_testing_scenario = true;</span> def main [ - <span class="Normal">screen</span>:number<span class="Special"> <- </span>copy <span class="Constant">1</span>:number + <span class="Normal">screen</span>:num<span class="Special"> <- </span>copy <span class="Constant">1</span>:num ] <span class="traceAbsent">-error: mixing variable names and numeric addresses in main</span> $error: <span class="Constant">0</span> @@ -192,7 +192,7 @@ Name[r][<span class="Constant">"screen"</span>] = SCREEN<span class="D <span class="Delimiter">:(before "End Rewrite Instruction(curr, recipe result)")</span> <span class="Comment">// rewrite `assume-screen width, height` to</span> -<span class="Comment">// `screen:address:screen <- new-fake-screen width, height`</span> +<span class="Comment">// `screen:&:screen <- new-fake-screen width, height`</span> <span class="Normal">if</span> <span class="Delimiter">(</span>curr<span class="Delimiter">.</span>name == <span class="Constant">"assume-screen"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> curr<span class="Delimiter">.</span>name = <span class="Constant">"new-fake-screen"</span><span class="Delimiter">;</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!curr<span class="Delimiter">.</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> @@ -203,7 +203,7 @@ Name[r][<span class="Constant">"screen"</span>] = SCREEN<span class="D <span class="Delimiter">}</span> <span class="Normal">else</span> <span class="Delimiter">{</span> assert<span class="Delimiter">(</span>curr<span class="Delimiter">.</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">());</span> - curr<span class="Delimiter">.</span>products<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>reagent<span class="Delimiter">(</span><span class="Constant">"screen:address:screen/raw"</span><span class="Delimiter">));</span> + curr<span class="Delimiter">.</span>products<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>reagent<span class="Delimiter">(</span><span class="Constant">"screen:&:screen/raw"</span><span class="Delimiter">));</span> curr<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>set_value<span class="Delimiter">(</span>SCREEN<span class="Delimiter">);</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> @@ -226,7 +226,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">"'screen-should-contain' requires exactly one ingredient, but got '"</span> << inst<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">0</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">0</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">"first ingredient of 'screen-should-contain' should be a literal string, 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> @@ -254,7 +254,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 'screen-should-contain-in-color' should be a number (color code), 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 'screen-should-contain-in-color' should be a literal string, 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> |