From bc4b6021deacced2046f9a4c1ef161a3b0ab4bd2 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 21 Apr 2021 19:56:32 -0700 Subject: . --- shell/sandbox.mu | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'shell/sandbox.mu') diff --git a/shell/sandbox.mu b/shell/sandbox.mu index cd20e6b8..7092d5d0 100644 --- a/shell/sandbox.mu +++ b/shell/sandbox.mu @@ -70,7 +70,7 @@ fn write-sandbox out: (addr stream byte), _self: (addr sandbox) { ## -fn render-sandbox screen: (addr screen), _self: (addr sandbox), xmin: int, ymin: int, xmax: int, ymax: int, globals: (addr global-table) { +fn render-sandbox screen: (addr screen), _self: (addr sandbox), xmin: int, ymin: int, xmax: int, ymax: int { clear-rect screen, xmin, ymin, xmax, ymax, 0/bg=black var self/esi: (addr sandbox) <- copy _self # data @@ -708,7 +708,7 @@ fn test-run-integer { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "1 ", "F - test-run-integer/0" check-screen-row screen, 1/y, "... ", "F - test-run-integer/1" check-screen-row screen, 2/y, "=> 1 ", "F - test-run-integer/2" @@ -730,7 +730,7 @@ fn test-run-with-spaces { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, " 1 ", "F - test-run-with-spaces/0" check-screen-row screen, 1/y, " ", "F - test-run-with-spaces/1" check-screen-row screen, 2/y, "... ", "F - test-run-with-spaces/2" @@ -751,7 +751,7 @@ fn test-run-quote { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "'a ", "F - test-run-quote/0" check-screen-row screen, 1/y, "... ", "F - test-run-quote/1" check-screen-row screen, 2/y, "=> a ", "F - test-run-quote/2" @@ -777,7 +777,7 @@ fn test-run-dotted-list { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "'(a . b) ", "F - test-run-dotted-list/0" check-screen-row screen, 1/y, "... ", "F - test-run-dotted-list/1" check-screen-row screen, 2/y, "=> (a . b) ", "F - test-run-dotted-list/2" @@ -805,7 +805,7 @@ fn test-run-dot-and-list { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "'(a . (b)) ", "F - test-run-dot-and-list/0" check-screen-row screen, 1/y, "... ", "F - test-run-dot-and-list/1" check-screen-row screen, 2/y, "=> (a b) ", "F - test-run-dot-and-list/2" @@ -829,7 +829,7 @@ fn test-run-final-dot { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "'(a .) ", "F - test-run-final-dot/0" check-screen-row screen, 1/y, "... ", "F - test-run-final-dot/1" check-screen-row screen, 2/y, "'. )' makes no sense ", "F - test-run-final-dot/2" @@ -856,7 +856,7 @@ fn test-run-double-dot { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "'(a . .) ", "F - test-run-double-dot/0" check-screen-row screen, 1/y, "... ", "F - test-run-double-dot/1" check-screen-row screen, 2/y, "'. .' makes no sense ", "F - test-run-double-dot/2" @@ -885,7 +885,7 @@ fn test-run-multiple-expressions-after-dot { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "'(a . b c) ", "F - test-run-multiple-expressions-after-dot/0" check-screen-row screen, 1/y, "... ", "F - test-run-multiple-expressions-after-dot/1" check-screen-row screen, 2/y, "cannot have multiple expressions between '.' and ')' ", "F - test-run-multiple-expressions-after-dot/2" @@ -906,7 +906,7 @@ fn test-run-error-invalid-integer { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "1a ", "F - test-run-error-invalid-integer/0" check-screen-row screen, 1/y, "... ", "F - test-run-error-invalid-integer/0" check-screen-row screen, 2/y, "invalid number ", "F - test-run-error-invalid-integer/2" @@ -926,7 +926,7 @@ fn test-run-move-cursor-into-trace { var screen/edi: (addr screen) <- address screen-on-stack initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "12 ", "F - test-run-move-cursor-into-trace/pre-0" check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " | ", "F - test-run-move-cursor-into-trace/pre-0/cursor" check-screen-row screen, 1/y, "... ", "F - test-run-move-cursor-into-trace/pre-1" @@ -936,7 +936,7 @@ fn test-run-move-cursor-into-trace { # move cursor into trace edit-sandbox sandbox, 9/tab, 0/no-globals, 0/no-screen, 0/no-disk # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "12 ", "F - test-run-move-cursor-into-trace/trace-0" check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-run-move-cursor-into-trace/trace-0/cursor" check-screen-row screen, 1/y, "... ", "F - test-run-move-cursor-into-trace/trace-1" @@ -946,7 +946,7 @@ fn test-run-move-cursor-into-trace { # move cursor into input edit-sandbox sandbox, 9/tab, 0/no-globals, 0/no-screen, 0/no-disk # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height check-screen-row screen, 0/y, "12 ", "F - test-run-move-cursor-into-trace/input-0" check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " | ", "F - test-run-move-cursor-into-trace/input-0/cursor" check-screen-row screen, 1/y, "... ", "F - test-run-move-cursor-into-trace/input-1" -- cgit 1.4.1-2-gfad0