summaryrefslogtreecommitdiff
path: root/tests/typ/expr/call.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-05-18 00:36:11 +0200
committerLaurenz <laurmaedje@gmail.com>2021-05-18 00:36:11 +0200
commit8b58171d7ca036d71b32749286c251cc91bdd10e (patch)
tree4594ab5088edf8eec44f3bafe3fb8fecb13ac61b /tests/typ/expr/call.typ
parent8d67c0ca5eb3486dde97fd281bd4a51d535c600c (diff)
Reorganize test cases
Diffstat (limited to 'tests/typ/expr/call.typ')
-rw-r--r--tests/typ/expr/call.typ70
1 files changed, 0 insertions, 70 deletions
diff --git a/tests/typ/expr/call.typ b/tests/typ/expr/call.typ
deleted file mode 100644
index dcf11806..00000000
--- a/tests/typ/expr/call.typ
+++ /dev/null
@@ -1,70 +0,0 @@
-// Test function calls.
-
----
-// One argument.
-#args(bold)
-
-// One argument and trailing comma.
-#args(1,)
-
-// One named argument.
-#args(a:2)
-
-// Mixed arguments.
-{args(1, b: "2", 3)}
-
-// Should output `() + 2`.
-#args() + 2
-
----
-// Ref: false
-
-// Call function assigned to variable.
-#let alias = type
-#test(alias(alias), "function")
-
-// Library function `font` returns template.
-#test(type(font(12pt)), "template")
-
----
-// Callee expressions.
-{
- // Error: 5-9 expected function, found boolean
- true()
-
- // Wrapped in parens.
- test((type)("hi"), "string")
-
- // Call the return value of a function.
- let adder(dx) = x => x + dx
- test(adder(2)(5), 7)
-}
-
-#let f(x, body) = (y) => {
- [{x}] + body + [{y}]
-}
-
-// Call return value of function with body.
-#f(1)[2](3)
-
-// Don't allow this to be a closure.
-// Should output `x => "hi"`.
-#let x = "x"
-#x => "hi"
-
----
-// Different forms of template arguments.
-
-#let a = "a"
-
-#args[a] \
-#args(a) \
-#args(a, [b]) \
-#args(a)[b]
-
-// Template can be argument or body depending on whitespace.
-#if "template" == type[b] [Sure ]
-#if "template" == type [Nope.] #else [thing.]
-
-// Should output `<function args> (Okay.)`.
-#args (Okay.)