typst/tests/lang/typ/expr-unary.typ
2021-02-17 21:30:20 +01:00

24 lines
351 B
XML

// Test unary expressions.
// Ref: false
---
// Test plus and minus.
#for v in (1, 3.14, 12pt, 45deg, 90%, 13% + 10pt) {
// Test plus.
test(+v, v)
// Test minus.
test(-v, -1 * v)
test(--v, v)
// Test combination.
test(-++ --v, -v)
}
#test(-(4 + 2), 6-12)
---
// Test not.
#test(not true, false)
#test(not false, true)