From 05727bfc3a9cfd45a8e2028dfd0806f7a8f88015 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 20 Feb 2021 17:53:40 +0100 Subject: =?UTF-8?q?Reorganize=20tests=20=F0=9F=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/lang/typ/expr-prec.typ | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 tests/lang/typ/expr-prec.typ (limited to 'tests/lang/typ/expr-prec.typ') diff --git a/tests/lang/typ/expr-prec.typ b/tests/lang/typ/expr-prec.typ deleted file mode 100644 index e64e583c..00000000 --- a/tests/lang/typ/expr-prec.typ +++ /dev/null @@ -1,30 +0,0 @@ -// Test operator precedence. -// Ref: false - ---- -// Multiplication binds stronger than addition. -#test(1+2*-3, -5) - -// Subtraction binds stronger than comparison. -#test(3 == 5 - 2, true) - -// Boolean operations bind stronger than '=='. -#test("a" == "a" and 2 < 3, true) -#test(not "b" == "b", false) - -// Assignment binds stronger than boolean operations. -// Error: 2-7 cannot assign to this expression -{not x = "a"} - ---- -// Parentheses override precedence. -#test((1), 1) -#test((1+2)*-3, -9) - -// Error: 14 expected closing paren -#test({(1 + 1}, 2) - ---- -// Precedence doesn't matter for chained unary operators. -// Error: 2-11 cannot apply '-' to boolean -{-not true} -- cgit v1.2.3