1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Additional tests

This commit is contained in:
Brian Fiete 2020-09-01 06:37:02 -07:00
parent 66d5f67528
commit 206b508d38
2 changed files with 18 additions and 0 deletions

View file

@ -16,6 +16,11 @@ namespace Tests
{
FuncA(a + 100);
}
void FuncC(int a) mut
{
FuncB(a + 1000);
}
}
concrete interface IFaceC

View file

@ -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";