From 5e45b2103e49301f2a4ab697a3bcca53c414a9d2 Mon Sep 17 00:00:00 2001 From: Tim Nelson Date: Thu, 14 Mar 2024 10:30:00 -0400 Subject: [PATCH] resolve old error --- forge/lang/alloy-syntax/parser.rkt | 2 +- forge/tests/error/main.rkt | 2 ++ forge/tests/error/malformed-test-double.frg | 5 +++++ forge/tests/forge/relations/breakers.frg | 3 --- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 forge/tests/error/malformed-test-double.frg diff --git a/forge/lang/alloy-syntax/parser.rkt b/forge/lang/alloy-syntax/parser.rkt index 982d85e8..6485e5cb 100644 --- a/forge/lang/alloy-syntax/parser.rkt +++ b/forge/lang/alloy-syntax/parser.rkt @@ -85,7 +85,7 @@ ParaDecls : /LEFT-PAREN-TOK @ParaDeclList? /RIGHT-PAREN-TOK AssertDecl : /ASSERT-TOK Name? Block CmdDecl : (Name /COLON-TOK)? (RUN-TOK | CHECK-TOK) (QualName | Block)? Scope? (/FOR-TOK Bounds)? -TestDecl : (Name /COLON-TOK)? (QualName | Block)? Scope? (/FOR-TOK Bounds)? /IS-TOK +TestDecl : (Name /COLON-TOK)? (QualName | Block) Scope? (/FOR-TOK Bounds)? /IS-TOK (SAT-TOK | UNSAT-TOK | THEOREM-TOK | FORGE_ERROR-TOK) TestExpectDecl : TEST-TOK? EXPECT-TOK Name? TestBlock TestBlock : /LEFT-CURLY-TOK TestDecl* /RIGHT-CURLY-TOK diff --git a/forge/tests/error/main.rkt b/forge/tests/error/main.rkt index 0c054bfe..92c4ee03 100644 --- a/forge/tests/error/main.rkt +++ b/forge/tests/error/main.rkt @@ -35,6 +35,8 @@ ;(list "expect-fun-no-args.frg" #rx"TODO") ;;;;;;;;;;;;;;;;;;;;;;;; + + (list "./malformed-test-double.frg" #rx"FOR-TOK") ;; regression ;;;;;;; Source locations ;;;;;;; (list "./loc/sig_use_loc_error.frg" #rx"sig_use_loc_error.frg:7:39") ; vs. reachable diff --git a/forge/tests/error/malformed-test-double.frg b/forge/tests/error/malformed-test-double.frg new file mode 100644 index 00000000..d334f228 --- /dev/null +++ b/forge/tests/error/malformed-test-double.frg @@ -0,0 +1,5 @@ +#lang forge + +test expect { + {} is sat for {} is sat +} \ No newline at end of file diff --git a/forge/tests/forge/relations/breakers.frg b/forge/tests/forge/relations/breakers.frg index 29214a70..988eea1b 100644 --- a/forge/tests/forge/relations/breakers.frg +++ b/forge/tests/forge/relations/breakers.frg @@ -44,9 +44,6 @@ test expect { -- Overlap with a previous test, but keep since it checks a valuable syntax foible cardinalityCheckSyntax: { {#{a: A | some FrontDesk.p[a]}} > 1} is sat - -- expander.rkt:701:40: preds: attribute contains non-syntax value - -- BAD_ERROR_2: {no l} is sat for {A = `A0 + `A1} is sat - ----- test "linear" ----- linearPossible: {} for {next is linear} is sat