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

More nullable tests

This commit is contained in:
Brian Fiete 2020-09-25 10:43:34 -07:00
parent 20faf884f5
commit a183da923d

View file

@ -4,6 +4,33 @@ namespace Tests
{
class Nullable
{
class ClassA
{
public int mA = 100;
public int Prop
{
set
{
mA = value;
}
}
public int GetVal()
{
return 123;
}
}
[Test]
public static void TestBasics()
{
ClassA ca = scope .();
ca?.Prop = ca.GetVal();
Test.Assert(ca.mA == 123);
ca = null;
ca?.Prop = ca.GetVal();
}
[Test]
public static void TestPrimitives()