diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-04-08 15:08:26 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-04-08 15:45:14 +0200 |
| commit | 712c00ecb72b67da2c0788e5d3eb4dcc6366b2a7 (patch) | |
| tree | f5d7ef4341a4728c980d020cc173fa6bb70feaff /tests/typ/utility | |
| parent | 977ac77e6a3298be2644a8231e93acbef9f7f396 (diff) | |
Em units
Diffstat (limited to 'tests/typ/utility')
| -rw-r--r-- | tests/typ/utility/math.typ | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/typ/utility/math.typ b/tests/typ/utility/math.typ index bb729890..4ccefa22 100644 --- a/tests/typ/utility/math.typ +++ b/tests/typ/utility/math.typ @@ -35,8 +35,20 @@ #test(abs(-0.0), 0.0) #test(abs(0.0), -0.0) #test(abs(-3.14), 3.14) -#test(abs(-12pt), 12pt) #test(abs(50%), 50%) +#test(abs(-25%), 25%) + +--- +// Error: 6-17 expected numeric value, found string +#abs("no number") + +--- +// Error: 6-11 cannot take absolute value of a length +#abs(-12pt) + +--- +// Error: 6-16 cannot take absolute value of a length +#abs(50% - 12pt) --- // Test the `even` and `odd` functions. @@ -62,14 +74,6 @@ #mod(3.0, 0.0) --- -// Error: 6-16 cannot take absolute value of a relative length -#abs(10pt + 50%) - ---- -// Error: 6-17 expected numeric value, found string -#abs("no number") - ---- // Test the `min` and `max` functions. #test(min(2, -4), -4) #test(min(3.5, 1e2, -0.1, 3), -0.1) |
