1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Ranges (ie: for (int a in 0..<count) for (int i in 1…10))

This commit is contained in:
Brian Fiete 2021-07-21 07:48:37 -07:00
parent e561a26695
commit 465050b81d
11 changed files with 418 additions and 18 deletions

View file

@ -72,6 +72,16 @@ namespace Tests
}
Test.Assert(iterations == 19);
Test.Assert(sGetValCount == 20);
int total = 0;
for (int i in 1..<10)
total += i;
Test.Assert(total == 1+2+3+4+5+6+7+8+9);
total = 0;
for (int i in 1...10)
total += i;
Test.Assert(total == 1+2+3+4+5+6+7+8+9+10);
}
public static void TestEnumerator1(EnumeratorTest e)