From aa2eb0b88aa4f15cf60f19a8d92014c76df6707a Mon Sep 17 00:00:00 2001 From: Andrey Chudnov Date: Tue, 1 Dec 2015 17:54:27 -0500 Subject: [PATCH] Per discussion in issue #40 we are not relaxing the left-hand-side restrictions. So, the test case is no longer valid. --- test-data/non-ref-lhs.js | 2 -- test/Test/StatementTests.hs | 4 ---- 2 files changed, 6 deletions(-) delete mode 100644 test-data/non-ref-lhs.js diff --git a/test-data/non-ref-lhs.js b/test-data/non-ref-lhs.js deleted file mode 100644 index 0032d779..00000000 --- a/test-data/non-ref-lhs.js +++ /dev/null @@ -1,2 +0,0 @@ -"foo" = 1; -(a+b) += 4*c; diff --git a/test/Test/StatementTests.hs b/test/Test/StatementTests.hs index edc49e18..1b993395 100644 --- a/test/Test/StatementTests.hs +++ b/test/Test/StatementTests.hs @@ -225,10 +225,6 @@ unitTests runTest = expectedParseFail "continue-wrong-label-scope" (2, 26) $: testCase "Break with the wrong label scope (extra ;)" $$ expectedParseFail "label-set" (3,11) - $: testCase "Non-reference left-hand-sides can be parsed" $$ - runTest "non-ref-lhs" - [ExprStmt () $ AssignExpr () OpAssign (StringLit () "foo") (NumLit () $ Left 1) - ,ExprStmt () $ AssignExpr () OpAssignAdd (InfixExpr () OpAdd (VarRef () $ Id () "a") (VarRef () $ Id () "b")) (InfixExpr () OpMul (NumLit () $ Left 4) (VarRef () $ Id () "c"))] $: testCase "Expressions prohibited by the grammar to occur as targets of assignments (LeftHandSideExpression restriction)" $$ expectedParseFail "bad-lhs" (1, 9) $: testCase "Number parsing" $$