diff options
Diffstat (limited to 'tests/typ/compute')
| -rw-r--r-- | tests/typ/compute/foundations.typ | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/typ/compute/foundations.typ b/tests/typ/compute/foundations.typ index c74a4cd6..9c7b13ca 100644 --- a/tests/typ/compute/foundations.typ +++ b/tests/typ/compute/foundations.typ @@ -41,6 +41,32 @@ #assert("true") --- +// Test failing assertions. +// Error: 11-19 equality assertion failed: value 10 was not equal to 11 +#assert.eq(10, 11) + +--- +// Test failing assertions. +// Error: 11-55 equality assertion failed: 10 and 12 are not equal +#assert.eq(10, 12, message: "10 and 12 are not equal") + +--- +// Test failing assertions. +// Error: 11-19 inequality assertion failed: value 11 was equal to 11 +#assert.ne(11, 11) + +--- +// Test failing assertions. +// Error: 11-57 inequality assertion failed: must be different from 11 +#assert.ne(11, 11, message: "must be different from 11") + +--- +// Test successful assertions. +#assert(5 > 3) +#assert.eq(15, 15) +#assert.ne(10, 12) + +--- // Test the `type` function. #test(type(1), "integer") #test(type(ltr), "direction") |
