summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/typ/utility/basics.typ16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/typ/utility/basics.typ b/tests/typ/utility/basics.typ
index a2f6b220..3cd4ffa9 100644
--- a/tests/typ/utility/basics.typ
+++ b/tests/typ/utility/basics.typ
@@ -2,6 +2,22 @@
// Ref: false
---
+// Test the `assert` function.
+#assert(1 + 1 == 2)
+#assert(2..5 == (2, 3, 4))
+#assert(not false)
+
+---
+// Test failing assertions.
+// Error: 9-15 assertion failed
+#assert(1 == 2)
+
+---
+// Test failing assertions.
+// Error: 9-15 expected boolean, found string
+#assert("true")
+
+---
// Test the `type` function.
#test(type(1), "integer")
#test(type(ltr), "direction")