From 3968181622694c4a15ae336049439b328649bca0 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 25 Oct 2021 13:34:49 +0200 Subject: Replace `..` syntax with `range` function --- tests/typ/code/ops-invalid.typ | 6 +----- tests/typ/code/ops.typ | 12 ------------ 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'tests/typ/code') diff --git a/tests/typ/code/ops-invalid.typ b/tests/typ/code/ops-invalid.typ index 1355181a..91dd576f 100644 --- a/tests/typ/code/ops-invalid.typ +++ b/tests/typ/code/ops-invalid.typ @@ -53,7 +53,7 @@ --- { let x = 2 - for _ in 0..61 { + for _ in range(61) { x *= 2 } // Error: 4-18 cannot repeat this string 4611686018427387904 times @@ -72,10 +72,6 @@ // Error: 3-4 expected function, found integer { 1 with () } ---- -// Error: 3-10 cannot apply '..' to integer and string -{ 1 .. "" } - --- // Error: 3-6 cannot access this expression mutably { (x) = "" } diff --git a/tests/typ/code/ops.typ b/tests/typ/code/ops.typ index 149837b2..61d1ce38 100644 --- a/tests/typ/code/ops.typ +++ b/tests/typ/code/ops.typ @@ -161,18 +161,6 @@ { x = "some" } #test(x, "some") { x += "thing" } #test(x, "something") ---- -// Test range operator. - -#let array = (1, 2, 3) -#test(1..4, array) -#test(1.. 4, array) -#test(1 ..4, array) -#test(1 .. 4, array) - -#test(-4..2, (-4, -3, -2, -1, 0, 1)) -#test(10..5, ()) - --- // Test with operator. // Ref: true -- cgit v1.2.3