summaryrefslogtreecommitdiff
path: root/tests/typ/code/ops-prec.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-29 13:37:25 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-29 14:18:13 +0100
commit0efe669278a5e1c3f2985eba2f3360e91159c54a (patch)
tree502712857c48f0decb5e698257c0a96d358a436e /tests/typ/code/ops-prec.typ
parent836692e73cff0356e409a9ba5b4887b86809d4ca (diff)
Reorganize library and tests
Diffstat (limited to 'tests/typ/code/ops-prec.typ')
-rw-r--r--tests/typ/code/ops-prec.typ30
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/typ/code/ops-prec.typ b/tests/typ/code/ops-prec.typ
deleted file mode 100644
index 23afcc5f..00000000
--- a/tests/typ/code/ops-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 mutate a temporary value
-{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}