diff options
Diffstat (limited to 'html/edit/011-errors.mu.html')
-rw-r--r-- | html/edit/011-errors.mu.html | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/html/edit/011-errors.mu.html b/html/edit/011-errors.mu.html index be2a087f..67c6c5d2 100644 --- a/html/edit/011-errors.mu.html +++ b/html/edit/011-errors.mu.html @@ -157,12 +157,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant">recipe foo [</span> <span class="Constant"> get 123:num, foo:offset</span> <span class="Constant">]</span>] - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, recipes, <span class="Constant">[foo]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, recipes, <span class="Constant">[foo]</span> assume-console [ press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] screen-should-contain [ <span class="Constant"> . errors found run (F4) .</span> @@ -193,7 +193,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant">local-scope</span> trace-until <span class="Constant">100/app</span> <span class="Comment"># trace too long</span> assume-screen <span class="Constant">100/width</span>, <span class="Constant">15/height</span> - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">[]</span>, <span class="Constant">[]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, <span class="Constant">[]</span>, <span class="Constant">[]</span> assume-console [ left-click <span class="Constant">3</span>, <span class="Constant">80</span> <span class="Comment"># create invalid sandbox 1</span> @@ -204,7 +204,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] <span class="Comment"># status line shows that error is in first sandbox</span> screen-should-contain [ @@ -216,7 +216,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant">local-scope</span> trace-until <span class="Constant">100/app</span> <span class="Comment"># trace too long</span> assume-screen <span class="Constant">100/width</span>, <span class="Constant">15/height</span> - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">[]</span>, <span class="Constant">[]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, <span class="Constant">[]</span>, <span class="Constant">[]</span> assume-console [ left-click <span class="Constant">3</span>, <span class="Constant">80</span> <span class="Comment"># create invalid sandbox 2</span> @@ -230,7 +230,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] <span class="Comment"># status line shows that error is in second sandbox</span> screen-should-contain [ @@ -242,12 +242,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant">local-scope</span> trace-until <span class="Constant">100/app</span> <span class="Comment"># trace too long</span> assume-screen <span class="Constant">100/width</span>, <span class="Constant">15/height</span> - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">[]</span>, <span class="Constant">[get foo, x:offset]</span> <span class="Comment"># invalid</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, <span class="Constant">[]</span>, <span class="Constant">[get foo, x:offset]</span> <span class="Comment"># invalid</span> assume-console [ press F4 <span class="Comment"># generate error</span> ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] assume-console [ left-click <span class="Constant">3</span>, <span class="Constant">58</span> @@ -256,7 +256,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press F4 <span class="Comment"># update sandbox</span> ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] <span class="Comment"># error should disappear</span> screen-should-contain [ @@ -282,11 +282,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant">y:&:num <- copy 0</span> <span class="Constant">z <- add x, y</span> <span class="Constant">]</span>] - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, recipes, <span class="Constant">[foo 2]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, recipes, <span class="Constant">[foo 2]</span> assume-console [ press F4 ] - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env screen-should-contain [ <span class="Constant"> . errors found (0) run (F4) .</span> <span class="Constant"> .recipe foo x:_elem -> z:_elem [ ┊ .</span> @@ -303,7 +303,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] <span class="Comment"># error should remain unchanged</span> screen-should-contain [ @@ -329,12 +329,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Comment"># call code that uses other variants of it, but not it itself</span> sandbox:text<span class="Special"> <- </span>new <span class="Constant">[x:&:list:num <- copy 0</span> <span class="Constant">to-text x]</span> - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, recipes, sandbox + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, recipes, sandbox <span class="Comment"># run it once</span> assume-console [ press F4 ] - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env <span class="Comment"># no errors anywhere on screen (can't check anything else, since to-text will return an address)</span> screen-should-contain-in-color <span class="Constant">1/red</span>, [ <span class="Constant"> . .</span> @@ -358,7 +358,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] <span class="Comment"># still no errors</span> screen-should-contain-in-color <span class="Constant">1/red</span>, [ @@ -388,12 +388,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant">recipe foo [</span> <span class="Constant"> x <- copy 0</span> <span class="Constant">]</span>] - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, recipes, <span class="Constant">[foo]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, recipes, <span class="Constant">[foo]</span> assume-console [ press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] screen-should-contain [ <span class="Constant"> . errors found run (F4) .</span> @@ -414,12 +414,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant">recipe foo \\[</span> <span class="Constant"> x <- copy 0</span> <span class="Constant">]</span> - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, recipes, <span class="Constant">[foo]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, recipes, <span class="Constant">[foo]</span> assume-console [ press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] screen-should-contain [ <span class="Constant"> . errors found run (F4) .</span> @@ -443,12 +443,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant"> x:&:point <- new point:type</span> <span class="Constant"> get x:&:point, 1:offset</span> <span class="Constant">]</span>] - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, recipes, <span class="Constant">[foo]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, recipes, <span class="Constant">[foo]</span> assume-console [ press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] screen-should-contain [ <span class="Constant"> . errors found run (F4) .</span> @@ -476,12 +476,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant"> y:&:point <- new point:type</span> <span class="Constant"> get *y:&:point, x:num</span> <span class="Constant">]</span>] - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, recipes, <span class="Constant">[foo]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, recipes, <span class="Constant">[foo]</span> assume-console [ press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] screen-should-contain [ <span class="Constant"> . errors found run (F4) .</span> @@ -509,11 +509,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant"> local-scope</span> <span class="Constant"> x:num <- copy y:num</span> <span class="Constant">]</span>] - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, recipes, <span class="Constant">[foo]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, recipes, <span class="Constant">[foo]</span> assume-console [ press F4 ] - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env screen-should-contain [ <span class="Constant"> . errors found run (F4) .</span> <span class="Constant"> . ┊foo .</span> @@ -530,7 +530,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] screen-should-contain [ <span class="Constant"> . errors found run (F4) .</span> @@ -551,13 +551,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assume-screen <span class="Constant">100/width</span>, <span class="Constant">10/height</span> <span class="Comment"># right editor contains an illegal instruction</span> sandbox:text<span class="Special"> <- </span>new <span class="Constant">[get 1234:num, foo:offset]</span> - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">[]</span>, sandbox + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, <span class="Constant">[]</span>, sandbox <span class="Comment"># run the code in the editors</span> assume-console [ press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] <span class="Comment"># check that screen prints error message in red</span> screen-should-contain [ @@ -613,14 +613,14 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assume-screen <span class="Constant">100/width</span>, <span class="Constant">10/height</span> <span class="Comment"># right editor contains an illegal instruction</span> sandbox:text<span class="Special"> <- </span>new <span class="Constant">[get 1234:num, foo:offset]</span> - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">[]</span>, sandbox + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, <span class="Constant">[]</span>, sandbox <span class="Comment"># run the code in the editors multiple times</span> assume-console [ press F4 press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] <span class="Comment"># check that screen prints error message just once</span> screen-should-contain [ @@ -648,13 +648,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant"> }</span> <span class="Constant">]</span>] <span class="Comment"># right editor contains an instruction</span> - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, recipes, <span class="Constant">[foo]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, recipes, <span class="Constant">[foo]</span> <span class="Comment"># run the sandbox</span> assume-console [ press F4 ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] screen-should-contain [ <span class="Constant"> . errors found (0) run (F4) .</span> @@ -681,12 +681,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color _, c:num<span class="Special"> <- </span>divide-with-remainder a, b <span class="muControl">reply</span> b ]] - env:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, recipes, <span class="Constant">[foo 4, 0]</span> + env:&:environment<span class="Special"> <- </span>new-programming-environment screen, recipes, <span class="Constant">[foo 4, 0]</span> <span class="Comment"># run</span> assume-console [ press F4 ] - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env <span class="Comment"># screen prints error message</span> screen-should-contain [ <span class="Constant"> . errors found (0) run (F4) .</span> @@ -704,7 +704,7 @@ _, c:num<span class="Special"> <- </span>divide-with-remainder a, b left-click <span class="Constant">4</span>, <span class="Constant">55</span> ] run [ - event-loop screen:&:screen, console:&:console, env + event-loop screen, console, env ] <span class="Comment"># screen should expand trace</span> screen-should-contain [ |