mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Reverted for (int i < j)
to reevaluate j
on every iteration
This commit is contained in:
parent
f1d9964ba1
commit
42580df269
2 changed files with 12 additions and 6 deletions
|
@ -32,7 +32,7 @@ namespace Tests
|
|||
|
||||
static int GetVal()
|
||||
{
|
||||
return 10 + sGetValCount++;
|
||||
return 10 + sGetValCount++ / 2;
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -70,8 +70,8 @@ namespace Tests
|
|||
{
|
||||
iterations++;
|
||||
}
|
||||
Test.Assert(iterations == 10);
|
||||
Test.Assert(sGetValCount == 1);
|
||||
Test.Assert(iterations == 19);
|
||||
Test.Assert(sGetValCount == 20);
|
||||
}
|
||||
|
||||
public static void TestEnumerator1(EnumeratorTest e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue