diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-10-25 13:34:49 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-10-25 13:38:32 +0200 |
| commit | 3968181622694c4a15ae336049439b328649bca0 (patch) | |
| tree | 979093e93b49bfde47e54bc4475cedf24d12e3d8 /tests/typ/code | |
| parent | adf52a873f0cdff310c236998fc5018a886b339b (diff) | |
Replace `..` syntax with `range` function
Diffstat (limited to 'tests/typ/code')
| -rw-r--r-- | tests/typ/code/ops-invalid.typ | 6 | ||||
| -rw-r--r-- | tests/typ/code/ops.typ | 12 |
2 files changed, 1 insertions, 17 deletions
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 @@ -73,10 +73,6 @@ { 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 @@ -162,18 +162,6 @@ { 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 |
