diff options
| author | HarmoGlace <23212967+HarmoGlace@users.noreply.github.com> | 2023-04-04 14:33:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-04 14:33:26 +0200 |
| commit | 4aa5e0a4a3d005c25cbd12c843e464a791340c1a (patch) | |
| tree | fd7daa485692eadd65a67e771cd2d71fcf6dc332 /tests | |
| parent | 2d1598e51d10bfe4e331c1ad6ca7899c5cdbb468 (diff) | |
Make behavior of calculation functions consistent (#515)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/compute/calc.typ | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/typ/compute/calc.typ b/tests/typ/compute/calc.typ index 51569f7a..b7c6df02 100644 --- a/tests/typ/compute/calc.typ +++ b/tests/typ/compute/calc.typ @@ -94,6 +94,26 @@ #calc.pow(2, calc.pow(2.0, 10000.0)) --- +// Error: 15-18 the return value is not a real number +#calc.pow(-1, 0.5) + +--- +// Error: 12-14 cannot take square root of negative number +#calc.sqrt(-1) + +--- +// Error: 11-13 a logarithm parameter must be strictly positive +#calc.log(-1) + +--- +// Error: 11-12 a logarithm base should be normal (not NaN, not infinite, non-null, not subnormal) +#calc.log(1, base: 0) + +--- +// Error: 11-13 this logarithm doesn't return a real value +#calc.log(10, base: -1) + +--- // Error: 10-12 expected at least one value #calc.min() |
