typst/tests/typ/library/math.typ
2021-05-18 16:31:22 +02:00

16 lines
305 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)