public void AddStructTwiceTest() { var source = "MyStruct{x=0,y=0,z=0}"; var cflat = new CFlat(); cflat.AddStruct <MyStruct>(); cflat.AddStruct <MyStruct>(); var s = TestHelper.RunExpression <Struct <MyStruct> >(cflat, source, out var a).value; a.AssertSuccessCall(); Assert.Equal(0, s.x); Assert.Equal(0, s.y); Assert.Equal(0, s.z); }
public void MarshalStructTest(string source, int x, int y, int z) { var cflat = new CFlat(); cflat.AddStruct <MyStruct>(); var s = TestHelper.RunExpression <Struct <MyStruct> >(cflat, source, out var a).value; a.AssertSuccessCall(); Assert.Equal(x, s.x); Assert.Equal(y, s.y); Assert.Equal(z, s.z); }