summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-07 11:28:52 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-07 11:30:17 +0100
commit5a0053c7291549bc0be3753a09d6dc0efb364da6 (patch)
tree02e304d1fe7f5816e1f911262e850b19e9e60253 /tests
parentb2572f9d48a8f0efd30014302dcc271cd89fa91e (diff)
Vectors and cases
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/math/matrix.pngbin0 -> 4854 bytes
-rw-r--r--tests/ref/math/shorthand.pngbin1230 -> 1231 bytes
-rw-r--r--tests/ref/math/simple.pngbin6555 -> 6560 bytes
-rw-r--r--tests/ref/math/syntax.pngbin53462 -> 53524 bytes
-rw-r--r--tests/typ/math/matrix.typ20
5 files changed, 20 insertions, 0 deletions
diff --git a/tests/ref/math/matrix.png b/tests/ref/math/matrix.png
new file mode 100644
index 00000000..ed763710
--- /dev/null
+++ b/tests/ref/math/matrix.png
Binary files differ
diff --git a/tests/ref/math/shorthand.png b/tests/ref/math/shorthand.png
index 4b14006b..840feac2 100644
--- a/tests/ref/math/shorthand.png
+++ b/tests/ref/math/shorthand.png
Binary files differ
diff --git a/tests/ref/math/simple.png b/tests/ref/math/simple.png
index 72f9c1c6..6c7fde55 100644
--- a/tests/ref/math/simple.png
+++ b/tests/ref/math/simple.png
Binary files differ
diff --git a/tests/ref/math/syntax.png b/tests/ref/math/syntax.png
index eaf18528..1000adb5 100644
--- a/tests/ref/math/syntax.png
+++ b/tests/ref/math/syntax.png
Binary files differ
diff --git a/tests/typ/math/matrix.typ b/tests/typ/math/matrix.typ
new file mode 100644
index 00000000..ec84778c
--- /dev/null
+++ b/tests/typ/math/matrix.typ
@@ -0,0 +1,20 @@
+// Test vectors, matrices, and cases.
+
+---
+$ v = vec(1, 2+3, 4) $
+
+---
+#set vec(delim: "|")
+$ vec(1, 2) $
+
+---
+// Error: 17-20 expected "(", "[", "{", or "|"
+#set vec(delim: "%")
+
+---
+$ f(x, y) := cases(
+ 1 "if" (x dot y)/2 <= 0,
+ 2 "if" x in NN,
+ 3 "if" x "is even",
+ 4 "else",
+) $