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_SimpleStructTSet>(); Tests.Assert(unrealStruct != null, "Test_SimpleStructTSet"); Tests.AssertTSetProperty <UInt8Property>(unrealStruct, "Val1"); Tests.AssertTSetProperty <UByteProperty>(unrealStruct, "Val2"); Tests.AssertTSetProperty <UInt16Property>(unrealStruct, "Val3"); Tests.AssertTSetProperty <UUInt16Property>(unrealStruct, "Val4"); Tests.AssertTSetProperty <UIntProperty>(unrealStruct, "Val5"); Tests.AssertTSetProperty <UUInt32Property>(unrealStruct, "Val6"); Tests.AssertTSetProperty <UInt64Property>(unrealStruct, "Val7"); Tests.AssertTSetProperty <UUInt64Property>(unrealStruct, "Val8"); Tests.AssertTSetProperty <UFloatProperty>(unrealStruct, "Val9"); Tests.AssertTSetProperty <UDoubleProperty>(unrealStruct, "Val10"); //Tests.AssertTSetProperty<UDelegateProperty>(unrealStruct, "Val11"); //Tests.AssertTSetProperty<UMulticastDelegateProperty>(unrealStruct, "Val12"); Tests.AssertTSetProperty <UObjectProperty>(unrealStruct, "Val13"); Tests.AssertTSetProperty <UEnumProperty>(unrealStruct, "Val14"); Tests.AssertTSetProperty <UStructProperty>(unrealStruct, "Val15"); Tests.AssertTSetProperty <UClassProperty>(unrealStruct, "Val16"); Tests.AssertTSetProperty <ULazyObjectProperty>(unrealStruct, "Val17"); //Tests.AssertTSetProperty<UWeakObjectProperty>(unrealStruct, "Val18"); Tests.AssertTSetProperty <USoftClassProperty>(unrealStruct, "Val19"); Tests.AssertTSetProperty <USoftObjectProperty>(unrealStruct, "Val20"); Tests.AssertTSetProperty <UStrProperty>(unrealStruct, "Val21"); Tests.AssertTSetProperty <UNameProperty>(unrealStruct, "Val22"); //Tests.AssertTSetProperty<UTextProperty>(unrealStruct, "Val23"); Test_SimpleStructTSet defaultValue = StructDefault <Test_SimpleStructTSet> .Value; // Check all lists default to empty (they will be constructed by the marshaler) foreach (FieldInfo field in defaultValue.GetType().GetFields()) { // HashSet doesn't have a Count we can easily get, obtain it using reflection object collection = field.GetValue(defaultValue); int count = (int)collection.GetType().GetProperty("Count").GetValue(collection); Tests.AssertEqual(count, 0, unrealStruct, field.Name); } }