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

Added '.{ x = 1, y = 2}' initializer expression

This commit is contained in:
Brian Fiete 2021-01-02 06:14:29 -08:00
parent b18cdc706c
commit 0692fb44a4
5 changed files with 127 additions and 33 deletions

View file

@ -134,6 +134,14 @@ namespace Tests
sb1.mA = 1;
sb1.mB = 2;
Test.Assert(sb0 == sb1);
sb0 = StructB { mA = 2 };
Test.Assert(sb0.mA == 2);
Test.Assert(sb0.mB == 0);
sb0 = .{ mA = 3, mB = 4 };
Test.Assert(sb0.mA == 3);
Test.Assert(sb0.mB == 4);
}
[Test]