summaryrefslogtreecommitdiff
path: root/tests/typ/compiler/methods.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-02-27 11:05:16 +0100
committerGitHub <noreply@github.com>2024-02-27 10:05:16 +0000
commit145723b1ef4fa23f1f6665b8907dfe79d0bf83cf (patch)
tree02a7de661ddd5dafa75dfce3e3c8b45a7333b9dc /tests/typ/compiler/methods.typ
parente9ee00a7c0df083663ff5ccca162238b88525e14 (diff)
New context system (#3497)
Diffstat (limited to 'tests/typ/compiler/methods.typ')
-rw-r--r--tests/typ/compiler/methods.typ21
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/typ/compiler/methods.typ b/tests/typ/compiler/methods.typ
index 9eed5aed..2dce8892 100644
--- a/tests/typ/compiler/methods.typ
+++ b/tests/typ/compiler/methods.typ
@@ -83,20 +83,19 @@
---
// Test length `to-absolute` method.
-
#set text(size: 12pt)
-#style(styles => {
- test((6pt).to-absolute(styles), 6pt)
- test((6pt + 10em).to-absolute(styles), 126pt)
- test((10em).to-absolute(styles), 120pt)
-})
+#context {
+ test((6pt).to-absolute(), 6pt)
+ test((6pt + 10em).to-absolute(), 126pt)
+ test((10em).to-absolute(), 120pt)
+}
#set text(size: 64pt)
-#style(styles => {
- test((6pt).to-absolute(styles), 6pt)
- test((6pt + 10em).to-absolute(styles), 646pt)
- test((10em).to-absolute(styles), 640pt)
-})
+#context {
+ test((6pt).to-absolute(), 6pt)
+ test((6pt + 10em).to-absolute(), 646pt)
+ test((10em).to-absolute(), 640pt)
+}
---
// Error: 2-21 cannot convert a length with non-zero em units (`-6pt + 10.5em`) to pt