public void CallVarArg() { TwoFields twoFields = TwoFields.Noot; AssertEquals(TwoFields.Noot, WithVarArg(twoFields)); AssertTrue(VarArgsIsNoot(twoFields)); }
public void SetInObjectArray() { object[] objs = new object[1]; TwoFields twoFields = TwoFields.Noot; objs[0] = twoFields; AssertEquals(TwoFields.Noot, objs[0]); }
public void FieldsWrongOrder() { TwoFields t1 = Program.Build <TwoFields>(0x08, 0x96, 0x01, 0x10, 0x82, 0x01); Assert.AreEqual(150, t1.Foo, "Foo, ascending"); Assert.AreEqual(130, t1.Bar, "Bar, ascending"); t1 = Program.Build <TwoFields>(0x10, 0x82, 0x01, 0x08, 0x96, 0x01); Assert.AreEqual(150, t1.Foo, "Foo, descending"); Assert.AreEqual(130, t1.Bar, "Bar, descending"); }
public static bool EnumReferenceIsNoot(ref TwoFields val) { return TwoFields.Noot == val; }
public static bool EnumReferenceIsNoot(ref TwoFields val) { return(TwoFields.Noot == val); }
public void TestCallByReference() { TwoFields twoFields = TwoFields.Noot; AssertTrue(EnumReferenceIsNoot(ref twoFields)); }