mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
24 lines
351 B
XML
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)
|