typst/tests/typ/utility/math.typ
Laurenz 1ee1d078e2 Fatal errors
- Makes errors fatal, so that a phase is only reached when all previous phases were error-free
- Parsing still recovers and can produce multiple errors
- Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import)
- The single error that could occur during execution is removed for now
- Removes Value::Error variant
2021-07-30 18:49:19 +02:00

18 lines
313 B
XML

// Test math functions.
// Ref: false
---
// Test `min` and `max` functions.
#test(min(2, -4), -4)
#test(min(3.5, 1e2, -0.1, 3), -0.1)
#test(max(-3, 11), 11)
#test(min("hi"), "hi")
---
// Error: 6 missing argument: value
#min()
---
// Error: 11-18 cannot compare integer with string
#test(min(1, "hi"), error)