diff --git a/IDEHelper/Tests/src/Loops.bf b/IDEHelper/Tests/src/Loops.bf index cc725da1..9909ec56 100644 --- a/IDEHelper/Tests/src/Loops.bf +++ b/IDEHelper/Tests/src/Loops.bf @@ -154,10 +154,16 @@ namespace Tests total += i; Test.Assert(total == 10+20+30+40+50+60+70+80); + int itr = 0; total = 0; - for (int i in iList[...^2][1...^2]) + for (int i in iList[...^2][1...^2].Reversed) + { + if (itr == 1) + Test.Assert(i == 70); total += i; - Test.Assert(total == 20+30+40+50+60+70+80); + ++itr; + } + Test.Assert(total == 80+70+60+50+40+30+20); var str = scope String(); (2...^3).ToString(str); @@ -165,6 +171,9 @@ namespace Tests int[] iEmptyArr = scope .(); var emptySpan = iEmptyArr[...]; + + for (var i in emptySpan.Reversed) + Test.FatalError(); } public static void TestEnumerator1(EnumeratorTest e)