public static void Run() { Test_SimpleStructTArray.Run(); Test_SimpleStructTSet.Run(); Test_SimpleStructTMap.Run(); Test_SimpleClassTArray.Run(); Test_SimpleClassTSet.Run(); Test_SimpleClassTMap.Run(); }
//public HashSet<FText> Val23; public static void Run() { UScriptStruct unrealStruct = UScriptStruct.GetStruct <Test_SimpleStructTMap>(); Tests.Assert(unrealStruct != null, "Test_SimpleStructTMap"); Tests.AssertTMapProperty <UInt8Property, UNameProperty>(unrealStruct, "Val1"); Tests.AssertTMapProperty <UByteProperty, UStrProperty>(unrealStruct, "Val2"); Tests.AssertTMapProperty <UInt16Property, USoftObjectProperty>(unrealStruct, "Val3"); Tests.AssertTMapProperty <UUInt16Property, USoftClassProperty>(unrealStruct, "Val4"); Tests.AssertTMapProperty <UIntProperty, USoftClassProperty>(unrealStruct, "Val5"); Tests.AssertTMapProperty <UUInt32Property, UWeakObjectProperty>(unrealStruct, "Val6"); Tests.AssertTMapProperty <UInt64Property, ULazyObjectProperty>(unrealStruct, "Val7"); Tests.AssertTMapProperty <UUInt64Property, UClassProperty>(unrealStruct, "Val8"); Tests.AssertTMapProperty <UFloatProperty, UStructProperty>(unrealStruct, "Val9"); Tests.AssertTMapProperty <UDoubleProperty, UEnumProperty>(unrealStruct, "Val10"); //Tests.AssertTMapProperty<UDelegateProperty, UObjectProperty>(unrealStruct, "Val11"); //Tests.AssertTMapProperty<UMulticastDelegateProperty, UMulticastDelegateProperty>(unrealStruct, "Val12"); Tests.AssertTMapProperty <UObjectProperty, UDelegateProperty>(unrealStruct, "Val13"); Tests.AssertTMapProperty <UEnumProperty, UDoubleProperty>(unrealStruct, "Val14"); Tests.AssertTMapProperty <UStructProperty, UFloatProperty>(unrealStruct, "Val15"); Tests.AssertTMapProperty <UClassProperty, UUInt64Property>(unrealStruct, "Val16"); Tests.AssertTMapProperty <ULazyObjectProperty, UInt64Property>(unrealStruct, "Val17"); //Tests.AssertTMapProperty<UWeakObjectProperty, UUInt32Property>(unrealStruct, "Val18"); Tests.AssertTMapProperty <USoftClassProperty, UIntProperty>(unrealStruct, "Val19"); Tests.AssertTMapProperty <USoftObjectProperty, UUInt16Property>(unrealStruct, "Val20"); Tests.AssertTMapProperty <UStrProperty, UInt16Property>(unrealStruct, "Val21"); Tests.AssertTMapProperty <UNameProperty, UByteProperty>(unrealStruct, "Val22"); //Tests.AssertTSetProperty<UTextProperty>(unrealStruct, "Val23"); Test_SimpleStructTMap defaultValue = StructDefault <Test_SimpleStructTMap> .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.IDictionary).Count, 0, unrealStruct, field.Name); } }