From 33399312b258ebfbdb3c33e54bb7c46bb402e4fd Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 28 Jan 2016 14:28:06 -0800 Subject: 2612 - sandbox/ tests always show recipe errors I spent the longest time trying to understand what bug 2268 fixed. But it's being tested now. --- sandbox/005-sandbox.mu | 1 - sandbox/010-warnings.mu | 56 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 39 insertions(+), 18 deletions(-) (limited to 'sandbox') diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu index 08bdf37f..929716a1 100644 --- a/sandbox/005-sandbox.mu +++ b/sandbox/005-sandbox.mu @@ -136,7 +136,6 @@ recipe run-sandboxes env:address:shared:programming-environment-data, screen:add local-scope load-ingredients errors-found?:boolean, env, screen <- update-recipes env, screen, test-recipes - reply-if errors-found? # check contents of editor current-sandbox:address:shared:editor-data <- get *env, current-sandbox:offset diff --git a/sandbox/010-warnings.mu b/sandbox/010-warnings.mu index f4651db5..a20e306d 100644 --- a/sandbox/010-warnings.mu +++ b/sandbox/010-warnings.mu @@ -146,9 +146,17 @@ recipe foo [ event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes ] screen-should-contain [ - # TODO: make this more specific . errors found run (F4) . + . . + .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + .0 x. .foo . + .foo: unknown element foo in container number . + .foo: first ingredient of 'get' should be a contai↩. + .ner, but got 123:number . + .foo: unknown element foo in container number . + .foo: first ingredient of 'get' should be a contai↩. + .ner, but got 123:number . .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. . . ] @@ -386,9 +394,15 @@ recipe foo [ event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes ] screen-should-contain [ - # TODO: make this more specific . errors found run (F4) . + . . + .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + .0 x. .foo . + .foo: missing type for x in 'x <- copy 0' . + .foo: can't copy 0 to x; types don't match . + .foo: missing type for x in 'x <- copy 0' . + .foo: can't copy 0 to x; types don't match . .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. . . ] @@ -412,9 +426,13 @@ recipe foo « event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes ] screen-should-contain [ - # TODO: make this more specific . errors found run (F4) . + . . + .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + .0 x. .foo . + .9: unbalanced '\\\[' for recipe . + .9: unbalanced '\\\[' for recipe . .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. . . ] @@ -438,11 +456,13 @@ recipe foo [ event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes ] screen-should-contain [ - # TODO: make this more specific . errors found run (F4) . - .foo . - .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. . . + .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + .0 x. + .foo . + .foo: first ingredient of 'get' should be a contai↩. + .ner, but got x:address:shared:point . ] ] @@ -465,11 +485,13 @@ recipe foo [ event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes ] screen-should-contain [ - # TODO: make this more specific . errors found run (F4) . - .foo . - .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. . . + .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + .0 x. + .foo . + .foo: expected ingredient 1 of 'get' to have type ↩. + .'offset'; got x:number . ] ] @@ -489,11 +511,12 @@ recipe foo [ ] event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes screen-should-contain [ - # TODO: make this more specific . errors found run (F4) . - .foo . - .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. . . + .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + .0 x. + .foo . + .foo: use before set: y . ] # rerun the file, check for the same error assume-console [ @@ -503,11 +526,12 @@ recipe foo [ event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes ] screen-should-contain [ - # TODO: make this more specific . errors found run (F4) . - .foo . - .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. . . + .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + .0 x. + .foo . + .foo: use before set: y . ] ] @@ -546,8 +570,6 @@ scenario run-instruction-and-print-warnings [ ] ] -# TODO: print warnings in file even if you can't run a sandbox - scenario run-instruction-and-print-warnings-only-once [ trace-until 100/app # trace too long assume-screen 50/width, 10/height -- cgit 1.4.1-2-gfad0 evision' href='/akkartik/mu/blame/subx/021byte_addressing.cc?h=hlt&id=6fc975ebcfb0b140c29927785504ffc63b0c2617'>^