summaryrefslogtreecommitdiff
path: root/tests/typ/compute/foundations.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-04-13 10:39:45 +0200
committerGitHub <noreply@github.com>2024-04-13 08:39:45 +0000
commit020294fca9a7065d4b9cf4e677f606ebaaa29b00 (patch)
treec0027ad22046e2726c22298461327823d6b88d53 /tests/typ/compute/foundations.typ
parent72dd79210602ecc799726fc096b078afbb47f299 (diff)
Better test runner (#3922)
Diffstat (limited to 'tests/typ/compute/foundations.typ')
-rw-r--r--tests/typ/compute/foundations.typ107
1 files changed, 0 insertions, 107 deletions
diff --git a/tests/typ/compute/foundations.typ b/tests/typ/compute/foundations.typ
deleted file mode 100644
index eb50c072..00000000
--- a/tests/typ/compute/foundations.typ
+++ /dev/null
@@ -1,107 +0,0 @@
-// Test foundational functions.
-// Ref: false
-
----
-#test(type(1), int)
-#test(type(ltr), direction)
-#test(type(10 / 3), float)
-
----
-#test(repr(ltr), "ltr")
-#test(repr((1, 2, false, )), "(1, 2, false)")
-
----
-// Test panic.
-// Error: 2-9 panicked
-#panic()
-
----
-// Test panic.
-// Error: 2-12 panicked with: 123
-#panic(123)
-
----
-// Test panic.
-// Error: 2-24 panicked with: "this is wrong"
-#panic("this is wrong")
-
----
-// Test failing assertions.
-// Error: 2-16 assertion failed
-#assert(1 == 2)
-
----
-// Test failing assertions.
-// Error: 2-51 assertion failed: two is smaller than one
-#assert(2 < 1, message: "two is smaller than one")
-
----
-// Test failing assertions.
-// Error: 9-15 expected boolean, found string
-#assert("true")
-
----
-// Test failing assertions.
-// Error: 2-19 equality assertion failed: value 10 was not equal to 11
-#assert.eq(10, 11)
-
----
-// Test failing assertions.
-// Error: 2-55 equality assertion failed: 10 and 12 are not equal
-#assert.eq(10, 12, message: "10 and 12 are not equal")
-
----
-// Test failing assertions.
-// Error: 2-19 inequality assertion failed: value 11 was equal to 11
-#assert.ne(11, 11)
-
----
-// Test failing assertions.
-// Error: 2-57 inequality assertion failed: must be different from 11
-#assert.ne(11, 11, message: "must be different from 11")
-
----
-// Test successful assertions.
-#assert(5 > 3)
-#assert.eq(15, 15)
-#assert.ne(10, 12)
-
----
-// Test the `type` function.
-#test(type(1), int)
-#test(type(ltr), direction)
-#test(type(10 / 3), float)
-
----
-// Test the eval function.
-#test(eval("1 + 2"), 3)
-#test(eval("1 + x", scope: (x: 3)), 4)
-#test(eval("let x = x + 1; x + 1", scope: (x: 1)), 3)
-
----
-// Test evaluation in other modes.
-// Ref: true
-#eval("[_Hello" + " World!_]") \
-#eval("_Hello" + " World!_", mode: "markup") \
-#eval("RR_1^NN", mode: "math", scope: (RR: math.NN, NN: math.RR))
-
----
-// Error: 7-12 expected pattern
-#eval("let")
-
----
-#show raw: it => text(font: "PT Sans", eval("[" + it.text + "]"))
-
-Interacting
-```
-#set text(blue)
-Blue #move(dy: -0.15em)[🌊]
-```
-
----
-// Error: 7-17 cannot continue outside of loop
-#eval("continue")
-
----
-// Error: 7-12 expected semicolon or line break
-#eval("1 2")