diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-23 14:38:37 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-23 14:38:45 +0100 |
| commit | affb3534538385056cfb60328f6dba6bd852229a (patch) | |
| tree | a0a1b4844d459a66c3d32e0ad0dacf3f47c3966b /tests/typ | |
| parent | 090831c9cb08c9b3c14ee30b423bb61275d70eb4 (diff) | |
| parent | 457ce954366f3a81989fee788c85a5b20a96ce96 (diff) | |
Merge main back
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/compute/foundations.typ | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/typ/compute/foundations.typ b/tests/typ/compute/foundations.typ index 83cda65f..eb3e7e35 100644 --- a/tests/typ/compute/foundations.typ +++ b/tests/typ/compute/foundations.typ @@ -11,12 +11,32 @@ #test(repr((1, 2, false, )), "(1, 2, false)") --- +// Test panic. +// Error: 7-9 panicked +#panic() + +--- +// Test panic. +// Error: 7-12 panicked with: 123 +#panic(123) + +--- +// Test panic. +// Error: 7-24 panicked with: "this is wrong" +#panic("this is wrong") + +--- // Test failing assertions. -// Error: 9-15 assertion failed +// Error: 8-16 assertion failed #assert(1 == 2) --- // Test failing assertions. +// Error: 8-51 assertion failed: two is smaller than one +#assert(2 < 1, message: "two is smaller than one") + +--- +// Test failing assertions. // Error: 9-15 expected boolean, found string #assert("true") |
