Esempio n. 1
0
        public static void Run()
        {
            Test_SimpleStructTArray.Run();
            Test_SimpleStructTSet.Run();
            Test_SimpleStructTMap.Run();

            Test_SimpleClassTArray.Run();
            Test_SimpleClassTSet.Run();
            Test_SimpleClassTMap.Run();
        }
Esempio n. 2
0
        //public List<FText> Val23;

        public static void Run()
        {
            UScriptStruct unrealStruct = UScriptStruct.GetStruct <Test_SimpleStructTArray>();

            Tests.Assert(unrealStruct != null, "Test_SimpleStructTArray");

            Tests.AssertTArrayProperty <UInt8Property>(unrealStruct, "Val1");
            Tests.AssertTArrayProperty <UByteProperty>(unrealStruct, "Val2");
            Tests.AssertTArrayProperty <UInt16Property>(unrealStruct, "Val3");
            Tests.AssertTArrayProperty <UUInt16Property>(unrealStruct, "Val4");
            Tests.AssertTArrayProperty <UIntProperty>(unrealStruct, "Val5");
            Tests.AssertTArrayProperty <UUInt32Property>(unrealStruct, "Val6");
            Tests.AssertTArrayProperty <UInt64Property>(unrealStruct, "Val7");
            Tests.AssertTArrayProperty <UUInt64Property>(unrealStruct, "Val8");
            Tests.AssertTArrayProperty <UFloatProperty>(unrealStruct, "Val9");
            Tests.AssertTArrayProperty <UDoubleProperty>(unrealStruct, "Val10");
            Tests.AssertTArrayProperty <UDelegateProperty>(unrealStruct, "Val11");
            Tests.AssertTArrayProperty <UMulticastDelegateProperty>(unrealStruct, "Val12");
            Tests.AssertTArrayProperty <UObjectProperty>(unrealStruct, "Val13");
            Tests.AssertTArrayProperty <UEnumProperty>(unrealStruct, "Val14");
            Tests.AssertTArrayProperty <UStructProperty>(unrealStruct, "Val15");
            Tests.AssertTArrayProperty <UClassProperty>(unrealStruct, "Val16");
            Tests.AssertTArrayProperty <ULazyObjectProperty>(unrealStruct, "Val17");
            Tests.AssertTArrayProperty <UWeakObjectProperty>(unrealStruct, "Val18");
            Tests.AssertTArrayProperty <USoftClassProperty>(unrealStruct, "Val19");
            Tests.AssertTArrayProperty <USoftObjectProperty>(unrealStruct, "Val20");
            Tests.AssertTArrayProperty <UStrProperty>(unrealStruct, "Val21");
            Tests.AssertTArrayProperty <UNameProperty>(unrealStruct, "Val22");
            //Tests.AssertTArrayProperty<UTextProperty>(unrealStruct, "Val23");

            Test_SimpleStructTArray defaultValue = StructDefault <Test_SimpleStructTArray> .Value;

            // Check all lists default to empty (they will be constructed by the marshaler)
            foreach (FieldInfo field in defaultValue.GetType().GetFields())
            {
                Tests.AssertEqual((field.GetValue(defaultValue) as System.Collections.IList).Count, 0,
                                  unrealStruct, field.Name);
            }
        }