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:
parent
e561a26695
commit
465050b81d
11 changed files with 418 additions and 18 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue