From 57f5c0a1b15775f9500335f455c7dc7d70cea9f5 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 15 Dec 2021 11:12:38 +0100 Subject: Set Rules Episode V: The Tests Strike Back --- tests/typ/code/ops.typ | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/typ/code/ops.typ') 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. -- cgit v1.2.3