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

Fixed packing issue, made Packed infer Ordered

This commit is contained in:
Brian Fiete 2020-03-14 12:33:34 -07:00
parent 76c8b62780
commit cf7914f71a
2 changed files with 16 additions and 1 deletions

View file

@ -111,6 +111,13 @@ namespace Tests
int8 mD;
}
[Packed]
struct StructJ
{
int8 mA;
int32 mB;
}
[Test]
static void TestBasics()
{
@ -153,6 +160,10 @@ namespace Tests
Test.Assert(sizeof(StructI) == 16);
Test.Assert(alignof(StructI) == 4);
Test.Assert(strideof(StructI) == 16);
Test.Assert(sizeof(StructJ) == 5);
Test.Assert(alignof(StructJ) == 1);
Test.Assert(strideof(StructJ) == 5);
}
public int Test<T>(T val)