summaryrefslogtreecommitdiff
path: root/tests/typ/code/ops.typ
diff options
context:
space:
mode:
authorMartin <mhaug@live.de>2021-12-22 20:37:34 +0100
committerGitHub <noreply@github.com>2021-12-22 20:37:34 +0100
commitf6c7a8292dc1ab0560408fca9d74505e9d7cf13a (patch)
treebadd3076f6146cec34c55764600df5124c408521 /tests/typ/code/ops.typ
parent738ff7e1f573bef678932b313be9969a17af8d22 (diff)
parent438255519e88bb790480306b9a9b452aaf054519 (diff)
Merge pull request #51 from typst/set-rules
Set rules
Diffstat (limited to 'tests/typ/code/ops.typ')
-rw-r--r--tests/typ/code/ops.typ10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/typ/code/ops.typ b/tests/typ/code/ops.typ
index 04a72e72..be2cdb48 100644
--- a/tests/typ/code/ops.typ
+++ b/tests/typ/code/ops.typ
@@ -64,7 +64,7 @@
}
// Linears cannot be divided by themselves.
- if type(v) != "linear" {
+ if type(v) != "relative length" {
test(v / v, 1.0)
test(v / v == 1, true)
}
@@ -130,12 +130,14 @@
#test(test == test, true)
#test((() => {}) == (() => {}), false)
-// Templates also compare by identity.
+// Templates compare by shallow equality.
#let t = [a]
#test(t == t, true)
-#test([] == [], false)
+#test([] == [], true)
+#test([a] == [a], true)
#test([] == [a], false)
-#test([a] == [a], false)
+#test([[a]] == [a], false)
+#test(box[] == box[], false)
---
// Test comparison operators.