mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Additional tests
This commit is contained in:
parent
66d5f67528
commit
206b508d38
2 changed files with 18 additions and 0 deletions
|
@ -16,6 +16,11 @@ namespace Tests
|
|||
{
|
||||
FuncA(a + 100);
|
||||
}
|
||||
|
||||
void FuncC(int a) mut
|
||||
{
|
||||
FuncB(a + 1000);
|
||||
}
|
||||
}
|
||||
|
||||
concrete interface IFaceC
|
||||
|
|
|
@ -275,6 +275,11 @@ namespace Tests
|
|||
sVal.mA = val;
|
||||
return sVal;
|
||||
}
|
||||
|
||||
public void operator++() mut
|
||||
{
|
||||
mA++;
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -283,6 +288,14 @@ namespace Tests
|
|||
IntStruct iVal = .();
|
||||
Test.Assert(iVal == 123);
|
||||
Test.Assert(iVal == 123.0f);
|
||||
|
||||
var iVal2 = iVal++;
|
||||
var iVal3 = ++iVal;
|
||||
++iVal;
|
||||
|
||||
Test.Assert(iVal == 126);
|
||||
Test.Assert(iVal2 == 123);
|
||||
Test.Assert(iVal3 == 125);
|
||||
}
|
||||
|
||||
const String cStrD = "D";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue