int-iterator is now defined interval

This commit is contained in:
2026-07-28 07:16:49 +02:00
parent 8e596d5979
commit 648533cbe3
12 changed files with 90 additions and 70 deletions
+5 -1
View File
@@ -41,10 +41,14 @@ func TestCollections(t *testing.T) {
/* 25 */ {`[<0,1,2,3,4>][0..]`, list.NewLinkedListA(0, 1, 2, 3, 4), nil},
/* 26 */ {`[<0,1,2,3,4>][0..-1..2]`, list.NewLinkedListA(0, 2), nil},
/* 27 */ {`[<0,1,2,3,4>][-1..0..2]`, list.NewLinkedListA(4, 2), nil},
/* 28 */ {`[-1..0..2]`, nil, `[1:8] unexpected interval expression`},
/* 29 */ {`"abcdef"['x'..]`, nil, `[1:14] interval expression expected integer, got string (x)`},
/* 30 */ {`"abcdef"[1+..]`, nil, `[1:12] infix operator "+" requires two non-nil operands, got 1`},
/* 31 */ {`"abcdef"[1..4+]`, nil, `[1:15] infix operator "+" requires two non-nil operands, got 1`},
}
t.Setenv("EXPR_PATH", ".")
// RunTestSuiteSpec(t, section, inputs, 27)
// RunTestSuiteSpec(t, section, inputs, 30)
RunTestSuite(t, section, inputs)
}