pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:9122:
multiset(object) x = (<>); object o = class {}(); x[o] = 1; destruct (o); int i; foreach (x;;) i++; return i; ]], 0) test_any([[
-
// Check foreach iterator stepping behavior.
-
array a = indices (allocate (7));
-
Array.Iterator i = get_iterator (a);
-
foreach (i;; int v)
-
if (v > 3) break;
-
foreach (i;; int v)
-
if (v < 5) break;
-
foreach (i;; int v)
-
return v;
-
]], 4)
-
-
test_any([[
+
// Check foreach with negative ranges [bug 7216]/[LysLysKOM 20892964]. array a = ({ -2, -1, 0, 1, 2 }); int total; foreach(a, int start) { foreach(a[start..], int val) { if (!intp(val)) error("Invalid svalue!\n"); total += (val + 3)*(start + 3); } } return total;