diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-07 11:28:52 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-07 11:30:17 +0100 |
| commit | 5a0053c7291549bc0be3753a09d6dc0efb364da6 (patch) | |
| tree | 02e304d1fe7f5816e1f911262e850b19e9e60253 /tests | |
| parent | b2572f9d48a8f0efd30014302dcc271cd89fa91e (diff) | |
Vectors and cases
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/math/matrix.png | bin | 0 -> 4854 bytes | |||
| -rw-r--r-- | tests/ref/math/shorthand.png | bin | 1230 -> 1231 bytes | |||
| -rw-r--r-- | tests/ref/math/simple.png | bin | 6555 -> 6560 bytes | |||
| -rw-r--r-- | tests/ref/math/syntax.png | bin | 53462 -> 53524 bytes | |||
| -rw-r--r-- | tests/typ/math/matrix.typ | 20 |
5 files changed, 20 insertions, 0 deletions
diff --git a/tests/ref/math/matrix.png b/tests/ref/math/matrix.png Binary files differnew file mode 100644 index 00000000..ed763710 --- /dev/null +++ b/tests/ref/math/matrix.png diff --git a/tests/ref/math/shorthand.png b/tests/ref/math/shorthand.png Binary files differindex 4b14006b..840feac2 100644 --- a/tests/ref/math/shorthand.png +++ b/tests/ref/math/shorthand.png diff --git a/tests/ref/math/simple.png b/tests/ref/math/simple.png Binary files differindex 72f9c1c6..6c7fde55 100644 --- a/tests/ref/math/simple.png +++ b/tests/ref/math/simple.png diff --git a/tests/ref/math/syntax.png b/tests/ref/math/syntax.png Binary files differindex eaf18528..1000adb5 100644 --- a/tests/ref/math/syntax.png +++ b/tests/ref/math/syntax.png 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", +) $ |
