Example #1
0
            public void CallVarArg()
            {
                TwoFields twoFields = TwoFields.Noot;

                AssertEquals(TwoFields.Noot, WithVarArg(twoFields));
                AssertTrue(VarArgsIsNoot(twoFields));
            }
Example #2
0
            public void SetInObjectArray()
            {
                object[]  objs      = new object[1];
                TwoFields twoFields = TwoFields.Noot;

                objs[0] = twoFields;
                AssertEquals(TwoFields.Noot, objs[0]);
            }
Example #3
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");
        }
Example #4
0
 public static bool EnumReferenceIsNoot(ref TwoFields val)
 {
     return TwoFields.Noot == val;
 }
Example #5
0
 public static bool EnumReferenceIsNoot(ref TwoFields val)
 {
     return(TwoFields.Noot == val);
 }
Example #6
0
            public void TestCallByReference()
            {
                TwoFields twoFields = TwoFields.Noot;

                AssertTrue(EnumReferenceIsNoot(ref twoFields));
            }