diff options
Diffstat (limited to 'tests/typ/compute')
| -rw-r--r-- | tests/typ/compute/calc.typ | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/tests/typ/compute/calc.typ b/tests/typ/compute/calc.typ index 6af5189b..c9a37d1b 100644 --- a/tests/typ/compute/calc.typ +++ b/tests/typ/compute/calc.typ @@ -55,20 +55,36 @@ #test(calc.even(-11), false) --- -// Test the `mod` function. -#test(calc.mod(1, 1), 0) -#test(calc.mod(5, 3), 2) -#test(calc.mod(5, -3), 2) -#test(calc.mod(22.5, 10), 2.5) -#test(calc.mod(9, 4.5), 0) +// Test the `rem` function. +#test(calc.rem(1, 1), 0) +#test(calc.rem(5, 3), 2) +#test(calc.rem(5, -3), 2) +#test(calc.rem(22.5, 10), 2.5) +#test(calc.rem(9, 4.5), 0) --- // Error: 14-15 divisor must not be zero -#calc.mod(5, 0) +#calc.rem(5, 0) --- // Error: 16-19 divisor must not be zero -#calc.mod(3.0, 0.0) +#calc.rem(3.0, 0.0) + +--- +// Test the `quo` function. +#test(calc.quo(1, 1), 1) +#test(calc.quo(5, 3), 1) +#test(calc.quo(5, -3), -1) +#test(calc.quo(22.5, 10), 2) +#test(calc.quo(9, 4.5), 2) + +--- +// Error: 14-15 divisor must not be zero +#calc.quo(5, 0) + +--- +// Error: 16-19 divisor must not be zero +#calc.quo(3.0, 0.0) --- // Test the `min` and `max` functions. |
