diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-10-05 19:37:38 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-10-05 19:37:38 +0200 |
| commit | 0a23bfbc23ec68ed229b78c8f9995928c133c4a6 (patch) | |
| tree | b3f4c13e634e387a2133a31cf7094dd6f56dd33d /tests/typ/utility | |
| parent | 58d1cc68d92b2b81ea402bd33389ecbcacf1d755 (diff) | |
Add `assert` function
Diffstat (limited to 'tests/typ/utility')
| -rw-r--r-- | tests/typ/utility/basics.typ | 16 |
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") |
