Files
UnrealEngineUWP/Engine/Source/Runtime/Serialization/Private/Tests/StructSerializerTest.cpp

992 lines
56 KiB
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Algo/ForEach.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "CoreMinimal.h"
#include "Misc/Guid.h"
#include "Serialization/MemoryWriter.h"
#include "Serialization/MemoryReader.h"
#include "Misc/AutomationTest.h"
#include "Templates/SubclassOf.h"
#include "Backends/JsonStructDeserializerBackend.h"
#include "Backends/JsonStructSerializerBackend.h"
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
#include "Backends/CborStructDeserializerBackend.h"
#include "Backends/CborStructSerializerBackend.h"
#include "StructDeserializer.h"
#include "StructSerializer.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "Tests/StructSerializerTestTypes.h"
#include "UObject/MetaData.h"
Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2771249 on 2015/11/18 by Joe.Tidmarsh Ensure that UCircularThrobber's Radius determines the widget's desired size when a child of UCanvasPanelSlot. #jira UE-23186 Change 2794402 on 2015/12/08 by Joe.Tidmarsh Reverting recent changes to Circular throbber. It's unintuative to enforce Size To Content. Will find some other solution. Change 2803507 on 2015/12/15 by Richard.TalbotWatkin BSP poly extrusion can now only be done in the normal direction of the poly. #jira UE-24168 - BSP face breaks off when extruding on Y or Z axes Change 2803510 on 2015/12/15 by Richard.TalbotWatkin Building new static mesh LODs now initializes override vertex colors based on LOD0. #jira UE-23747 - CLONE - if LODs are generated for meshes with vertex colors in a level the vertex colors dont propagate to the LOD in the level Change 2808877 on 2015/12/18 by Alexis.Matte Make sure the delta scale sign is swap when we have multiple axis with different sign current axis value #jira UE-21574 #codereview nick.darnell Change 2810114 on 2015/12/21 by Alexis.Matte #jira UE-23769 We now expose a message telling the user that we found some mesh that are not reference by any scene node in the fbx file. #codereview nick.darnell Change 2810211 on 2015/12/21 by Richard.TalbotWatkin Fixed issue with Show Only Selected not showing members of actor groups. #jira UE-24453 - CLONE - Show Selected is broken for certain Orion meshes Change 2811035 on 2015/12/22 by Alexis.Matte #jira UE-24671 Polish UI #codereview nick.darnell Change 2811123 on 2015/12/22 by Alexis.Matte #jira UE-21936 We now can decide which fbx sdk compatibility version we can use when exportting to a fbx file. #codereview nick.darnell Change 2812830 on 2015/12/28 by Richard.TalbotWatkin Prevent engine assets' properties from having project assets assigned to them. #jira UE-18215 - Details panel: prevent engine content from referencing game content Change 2812854 on 2015/12/28 by Richard.TalbotWatkin Fixed issue where floating windows were having their border size erroneously added again and again. Allowed PIE windows to not respect work area bounds if they are created centered, so that they can overlap off the edge of the screen. #jira UE-24465 - 10 Pixels Added to Width & Height of Floating Editor Windows Each Time Project is Reopened #jira UE-24364 - "Always Center Window to Screen" No Longer Functioning in New Editor Window (PIE) Change 2812875 on 2015/12/28 by Alexis.Matte #jira ue-22237 first implementation for skeletal mesh scene import and reimport. Small refator to remove duplicate code in different fbx list ui. #codereview nick.darnell Change 2813172 on 2015/12/29 by Alexis.Matte #jira ue-21656 Partial submit, the base code is there to add all light type with there properties. #codereview nick.darnell Change 2813403 on 2015/12/30 by Richard.TalbotWatkin PIE in New Editor Window now respects the Game Gets Mouse Control setting. This provides a workaround for UE-24824 where attempting to drag a PIE window fails due to the viewport capturing and locking the mouse to itself in FSceneViewport::OnFocusReceived. Change 2813429 on 2015/12/30 by Alexis.Matte #jira ue-21656 -spotlight and point light support fbx attenuation -fix the light orientation so now directional and spotlight point to the same direction of the fbx #codereview nick.darnell Change 2813456 on 2015/12/30 by Alexis.Matte #jira ue-21656 -Import the camera from fbx #codereview nick.darnell Change 2813457 on 2015/12/30 by Richard.TalbotWatkin Fixed issues with the code which determines whether the user is attempting to assign a game asset/class to an engine asset's property. #jira UE-18215 - Details panel: prevent engine content from referencing game content Change 2813475 on 2015/12/30 by Richard.TalbotWatkin Removed erroneous debug code. Change 2814451 on 2016/01/04 by Joe.Tidmarsh Fixed Tint colour for circular throbber. #jira UE-24445 Change 2814546 on 2016/01/04 by Richard.TalbotWatkin Force Message Log to update its category list if a new category is added while it is open. #jira UE-24266 - Message Log not updating Categories in Real-Time Change 2814613 on 2016/01/04 by Alexis.Matte [CL 2851481 by Nick Darnell in Main branch]
2016-02-01 14:57:29 -05:00
#if WITH_DEV_AUTOMATION_TESTS
/* Internal helpers
*****************************************************************************/
namespace StructSerializerTest
{
template<typename KeyType, typename ValueType>
void CopyKeys(TMap<KeyType, ValueType>& OutMap, const TMap<KeyType, ValueType>& SourceMap)
{
OutMap.Empty(SourceMap.Num());
Algo::ForEach(SourceMap, [&OutMap](const TPair<KeyType, ValueType>& Other)
{
OutMap.Add(Other.Key);
});
}
template<>
void CopyKeys(TMap<FString, FVector>& OutMap, const TMap<FString, FVector>& SourceMap)
{
OutMap.Empty(SourceMap.Num());
Algo::ForEach(SourceMap, [&OutMap](const TPair<FString, FVector>& Other)
{
OutMap.Add(Other.Key, FVector(76.7f));
});
}
template<>
void CopyKeys(TMap<FString, FStructSerializerBuiltinTestStruct>& OutMap, const TMap<FString, FStructSerializerBuiltinTestStruct>& SourceMap)
{
OutMap.Empty(SourceMap.Num());
Algo::ForEach(SourceMap, [&OutMap](const TPair<FString, FStructSerializerBuiltinTestStruct>& Other)
{
OutMap.Add(Other.Key, { NoInit });
});
}
void ValidateNumerics(FAutomationTestBase& Test, const FStructSerializerNumericTestStruct& Struct1, const FStructSerializerNumericTestStruct& Struct2)
{
Test.TestEqual<int8>(TEXT("Numerics.Int8 value must be the same before and after de-/serialization"), Struct1.Int8, Struct2.Int8);
Test.TestEqual<int16>(TEXT("Numerics.Int16 value must be the same before and after de-/serialization"), Struct1.Int16, Struct2.Int16);
Test.TestEqual<int32>(TEXT("Numerics.Int32 value must be the same before and after de-/serialization"), Struct1.Int32, Struct2.Int32);
Test.TestEqual<int64>(TEXT("Numerics.Int64 value must be the same before and after de-/serialization"), Struct1.Int64, Struct2.Int64);
Test.TestEqual<uint8>(TEXT("Numerics.UInt8 value must be the same before and after de-/serialization"), Struct1.UInt8, Struct2.UInt8);
Test.TestEqual<uint16>(TEXT("Numerics.UInt16 value must be the same before and after de-/serialization"), Struct1.UInt16, Struct2.UInt16);
Test.TestEqual<uint32>(TEXT("Numerics.UInt32 value must be the same before and after de-/serialization"), Struct1.UInt32, Struct2.UInt32);
Test.TestEqual<uint64>(TEXT("Numerics.UInt64 value must be the same before and after de-/serialization"), Struct1.UInt64, Struct2.UInt64);
Test.TestEqual<float>(TEXT("Numerics.Float value must be the same before and after de-/serialization"), Struct1.Float, Struct2.Float);
Test.TestEqual<double>(TEXT("Numerics.Double value must be the same before and after de-/serialization"), Struct1.Double, Struct2.Double);
}
void ValidateBooleans(FAutomationTestBase& Test, const FStructSerializerBooleanTestStruct& Struct1, const FStructSerializerBooleanTestStruct& Struct2)
{
Test.TestEqual<bool>(TEXT("Booleans.BoolFalse must be the same before and after de-/serialization"), Struct1.BoolFalse, Struct2.BoolFalse);
Test.TestEqual<bool>(TEXT("Booleans.BoolTrue must be the same before and after de-/serialization"), Struct1.BoolTrue, Struct2.BoolTrue);
Test.TestEqual<bool>(TEXT("Booleans.Bitfield0 must be the same before and after de-/serialization"), Struct1.Bitfield0, Struct2.Bitfield0);
Test.TestEqual<bool>(TEXT("Booleans.Bitfield1 must be the same before and after de-/serialization"), Struct1.Bitfield1, Struct2.Bitfield1);
Test.TestEqual<bool>(TEXT("Booleans.Bitfield2Set must be the same before and after de-/serialization"), Struct1.Bitfield2Set, Struct2.Bitfield2Set);
Test.TestEqual<bool>(TEXT("Booleans.Bitfield3 must be the same before and after de-/serialization"), Struct1.Bitfield3, Struct2.Bitfield3);
Test.TestEqual<bool>(TEXT("Booleans.Bitfield4Set must be the same before and after de-/serialization"), Struct1.Bitfield4Set, Struct2.Bitfield4Set);
Test.TestEqual<bool>(TEXT("Booleans.Bitfield5Set must be the same before and after de-/serialization"), Struct1.Bitfield5Set, Struct2.Bitfield5Set);
Test.TestEqual<bool>(TEXT("Booleans.Bitfield6 must be the same before and after de-/serialization"), Struct1.Bitfield6, Struct2.Bitfield6);
Test.TestEqual<bool>(TEXT("Booleans.Bitfield7 must be the same before and after de-/serialization"), Struct1.Bitfield7Set, Struct2.Bitfield7Set);
}
void ValidateObjects(FAutomationTestBase& Test, const FStructSerializerObjectTestStruct& Struct1, const FStructSerializerObjectTestStruct& Struct2)
{
Test.TestEqual<class UClass*>(TEXT("Objects.RawClass must be the same before and after de-/serialization"), Struct1.RawClass, Struct2.RawClass);
Test.TestEqual<class UClass*>(TEXT("Objects.WrappedClass must be the same before and after de-/serialization"), Struct1.WrappedClass, Struct2.WrappedClass);
Test.TestEqual<TSubclassOf<class UMetaData>>(TEXT("Objects.SubClass must be the same before and after de-/serialization"), Struct1.SubClass, Struct2.SubClass);
Test.TestEqual<TSoftClassPtr<class UMetaData>>(TEXT("Objects.SoftClass must be the same before and after de-/serialization"), Struct1.SoftClass, Struct2.SoftClass);
Test.TestEqual<UObject*>(TEXT("Objects.RawObject must be the same before and after de-/serialization"), Struct1.RawObject, Struct2.RawObject);
Test.TestEqual<UObject*>(TEXT("Objects.WrappedObject must be the same before and after de-/serialization"), Struct1.WrappedObject, Struct2.WrappedObject);
Test.TestEqual<TWeakObjectPtr<class UMetaData>>(TEXT("Objects.WeakObject must be the same before and after de-/serialization"), Struct1.WeakObject, Struct2.WeakObject);
Test.TestEqual<TSoftObjectPtr<class UMetaData>>(TEXT("Objects.SoftObject must be the same before and after de-/serialization"), Struct1.SoftObject, Struct2.SoftObject);
Test.TestEqual<FSoftClassPath>(TEXT("Objects.ClassPath must be the same before and after de-/serialization"), Struct1.ClassPath, Struct2.ClassPath);
Test.TestEqual<FSoftObjectPath>(TEXT("Objects.ObjectPath must be the same before and after de-/serialization"), Struct1.ObjectPath, Struct2.ObjectPath);
}
void ValidateBuiltIns(FAutomationTestBase& Test, const FStructSerializerBuiltinTestStruct& Struct1, const FStructSerializerBuiltinTestStruct& Struct2)
{
Test.TestEqual<FGuid>(TEXT("Builtins.Guid must be the same before and after de-/serialization"), Struct1.Guid, Struct2.Guid);
Test.TestEqual<FName>(TEXT("Builtins.Name must be the same before and after de-/serialization"), Struct1.Name, Struct2.Name);
Test.TestEqual<FString>(TEXT("Builtins.String must be the same before and after de-/serialization"), Struct1.String, Struct2.String);
Test.TestEqual<FString>(TEXT("Builtins.Text must be the same before and after de-/serialization"), Struct1.Text.ToString(), Struct2.Text.ToString());
Test.TestEqual<FVector>(TEXT("Builtins.Vector must be the same before and after de-/serialization"), Struct1.Vector, Struct2.Vector);
Test.TestEqual<FVector4>(TEXT("Builtins.Vector4 must be the same before and after de-/serialization"), Struct1.Vector4, Struct2.Vector4);
Test.TestEqual<FRotator>(TEXT("Builtins.Rotator must be the same before and after de-/serialization"), Struct1.Rotator, Struct2.Rotator);
Test.TestEqual<FQuat>(TEXT("Builtins.Quat must be the same before and after de-/serialization"), Struct1.Quat, Struct2.Quat);
Test.TestEqual<FColor>(TEXT("Builtins.Color must be the same before and after de-/serialization"), Struct1.Color, Struct2.Color);
}
void ValidateArrays(FAutomationTestBase& Test, const FStructSerializerArrayTestStruct& Struct1, const FStructSerializerArrayTestStruct& Struct2)
{
Test.TestEqual<TArray<int32>>(TEXT("Arrays.Int32Array must be the same before and after de-/serialization"), Struct1.Int32Array, Struct2.Int32Array);
Test.TestEqual<TArray<uint8>>(TEXT("Arrays.ByteArray must be the same before and after de-/serialization"), Struct1.ByteArray, Struct2.ByteArray);
Test.TestEqual<int32>(TEXT("Arrays.StaticSingleElement[0] must be the same before and after de-/serialization"), Struct1.StaticSingleElement[0], Struct2.StaticSingleElement[0]);
Test.TestEqual<int32>(TEXT("Arrays.StaticInt32Array[0] must be the same before and after de-/serialization"), Struct1.StaticInt32Array[0], Struct2.StaticInt32Array[0]);
Test.TestEqual<int32>(TEXT("Arrays.StaticInt32Array[1] must be the same before and after de-/serialization"), Struct1.StaticInt32Array[1], Struct2.StaticInt32Array[1]);
Test.TestEqual<int32>(TEXT("Arrays.StaticInt32Array[2] must be the same before and after de-/serialization"), Struct1.StaticInt32Array[2], Struct2.StaticInt32Array[2]);
Test.TestEqual<float>(TEXT("Arrays.StaticFloatArray[0] must be the same before and after de-/serialization"), Struct1.StaticFloatArray[0], Struct2.StaticFloatArray[0]);
Test.TestEqual<float>(TEXT("Arrays.StaticFloatArray[1] must be the same before and after de-/serialization"), Struct1.StaticFloatArray[1], Struct2.StaticFloatArray[1]);
Test.TestEqual<float>(TEXT("Arrays.StaticFloatArray[2] must be the same before and after de-/serialization"), Struct1.StaticFloatArray[2], Struct2.StaticFloatArray[2]);
Test.TestEqual<TArray<FVector>>(TEXT("Arrays.VectorArray must be the same before and after de-/serialization"), Struct1.VectorArray, Struct2.VectorArray);
}
void ValidateMaps(FAutomationTestBase& Test, const FStructSerializerMapTestStruct& Struct1, const FStructSerializerMapTestStruct& Struct2)
{
Test.TestTrue(TEXT("Maps.IntToStr must be the same before and after de-/serialization"), Struct1.IntToStr.OrderIndependentCompareEqual(Struct2.IntToStr));
Test.TestTrue(TEXT("Maps.StrToStr must be the same before and after de-/serialization"), Struct1.StrToStr.OrderIndependentCompareEqual(Struct2.StrToStr));
Test.TestTrue(TEXT("Maps.StrToVec must be the same before and after de-/serialization"), Struct1.StrToVec.OrderIndependentCompareEqual(Struct2.StrToVec));
}
void ValidateSets(FAutomationTestBase& Test, const FStructSerializerSetTestStruct& Struct1, const FStructSerializerSetTestStruct& Struct2)
{
Test.TestTrue(TEXT("Sets.IntSet must be the same before and after de-/serialization"), Struct1.IntSet.Num() == Struct2.IntSet.Num() && Struct1.IntSet.Difference(Struct2.IntSet).Num() == 0);
Test.TestTrue(TEXT("Sets.StrSet must be the same before and after de-/serialization"), Struct1.StrSet.Num() == Struct2.StrSet.Num() && Struct1.StrSet.Difference(Struct2.StrSet).Num() == 0);
Test.TestTrue(TEXT("Sets.NameSet must be the same before and after de-/serialization"), Struct1.NameSet.Num() == Struct2.NameSet.Num() && Struct1.NameSet.Difference(Struct2.NameSet).Num() == 0);
Test.TestTrue(TEXT("Sets.StructSet must be the same before and after de-/serialization"), Struct1.StructSet.Num() == Struct2.StructSet.Num() && Struct1.StructSet.Difference(Struct2.StructSet).Num() == 0);
}
void ValidateLWCSerializationBackwardCompatibility(FAutomationTestBase& Test, const FStructSerializerLWCTypesTest& Struct1, const FStructSerializerNonLWCTypesTest& Struct2)
{
//Make comparison by casting the double (lwc) version down to float (non-lwc) since this is what will happen during serialization
Test.TestEqual<FVector3f>(TEXT("LWC Vector must be deserialized to a Non-LWC Vector"), (FVector3f)Struct1.Vector, Struct2.Vector);
Test.TestEqual<FVector2f>(TEXT("LWC Vector2D must be deserialized to a Non-LWC Vector2D"), (FVector2f)Struct1.Vector2D, Struct2.Vector2D);
Test.TestEqual<FVector4f>(TEXT("LWC Vector4 must be deserialized to a Non-LWC Vector4"), (FVector4f)Struct1.Vector4, Struct2.Vector4);
Test.TestEqual<FMatrix44f>(TEXT("LWC Matrix must be deserialized to a Non-LWC Matrix"), (FMatrix44f)Struct1.Matrix, Struct2.Matrix);
Test.TestEqual<FPlane4f>(TEXT("LWC Plane must be deserialized to a Non-LWC Plane"), (FPlane4f)Struct1.Plane, Struct2.Plane);
Test.TestEqual<FQuat4f>(TEXT("LWC Quat must be deserialized to a Non-LWC Quat"), (FQuat4f)Struct1.Quat, Struct2.Quat);
Test.TestEqual<FRotator3f>(TEXT("LWC Rotator must be deserialized to a Non-LWC Rotator"), (FRotator3f)Struct1.Rotator, Struct2.Rotator);
Test.TestTrue(TEXT("LWC Transform must be deserialized to a Non-LWC Transform"), Struct2.Transform.Equals((FTransform3f)Struct1.Transform));
Test.TestEqual<FBox3f>(TEXT("LWC Box must be deserialized to a Non-LWC Box"), (FBox3f)Struct1.Box, Struct2.Box);
Test.TestEqual<FBox2f>(TEXT("LWC Box2D must be deserialized to a Non-LWC Box2D"), (FBox2f)Struct1.Box2D, Struct2.Box2D);
Test.TestEqual<FBoxSphereBounds3f>(TEXT("LWC BoxSphereBounds must be deserialized to a Non-LWC BoxSphereBounds"), (FBoxSphereBounds3f)Struct1.BoxSphereBounds, Struct2.BoxSphereBounds);
Test.TestEqual<float>(TEXT("LWC struct float must be the same when deserialized to a non-LWC struct float"), Struct1.Float, Struct2.Float);
Test.TestEqual<double>(TEXT("LWC struct double must be the same when deserialized to a non-LWC struct double"), Struct1.Double, Struct2.Double);
const bool bIsOrientedBoxEqual = Struct1.OrientedBox.AxisX == FVector(Struct2.OrientedBox.AxisX)
&& Struct1.OrientedBox.AxisY == FVector(Struct2.OrientedBox.AxisY)
&& Struct1.OrientedBox.AxisZ == FVector(Struct2.OrientedBox.AxisZ)
&& Struct1.OrientedBox.Center == FVector(Struct2.OrientedBox.Center)
&& Struct1.OrientedBox.ExtentX == Struct2.OrientedBox.ExtentX
&& Struct1.OrientedBox.ExtentY == Struct2.OrientedBox.ExtentY
&& Struct1.OrientedBox.ExtentZ == Struct2.OrientedBox.ExtentZ;
Test.TestTrue(TEXT("LWC OrientedBox must be deserialized to a Non-LWC OrientedBox"), bIsOrientedBoxEqual);
//Container testing
bool bAreArrayEqual = Struct1.VectorArray.Num() == Struct2.VectorArray.Num();
for (int32 Index = 0; Index < Struct1.VectorArray.Num() && bAreArrayEqual; ++Index)
{
if ((FVector3f)Struct1.VectorArray[Index] != Struct2.VectorArray[Index])
{
bAreArrayEqual = false;
}
}
Test.TestTrue(TEXT("Array of LWC Vectors must be deserialized to an Array of Non-LWC Vectors"), bAreArrayEqual);
bool bAreMapsEqual = Struct1.StrToVec.Num() == Struct2.StrToVec.Num();
for (const TPair<FString, FVector>& Struct1Pair : Struct1.StrToVec)
{
const FVector3f* Struct2Value = Struct2.StrToVec.Find(Struct1Pair.Key);
if (Struct2Value == nullptr)
{
bAreMapsEqual = false;
break;
}
const FVector3f Value = *Struct2Value;
if (Value != (FVector3f)Struct1Pair.Value)
{
bAreMapsEqual = false;
break;
}
}
Test.TestTrue(TEXT("Map of LWC Vectors must be deserialized to a Map of Non-LWC Vectors"), bAreMapsEqual);
bool bAreSetsEqual = Struct1.VectorSet.Num() == Struct2.VectorSet.Num();
for (const FVector& Vector : Struct1.VectorSet)
{
//Cast down like serialization has done
const FVector3f FloatVector = (FVector3f)Vector;
if (Struct2.VectorSet.Contains(FloatVector) == false)
{
bAreSetsEqual = false;
break;
}
}
Test.TestTrue(TEXT("Set of LWC Vectors must be deserialized to a Set of Non-LWC Vectors"), bAreSetsEqual);
}
void ValidateLWCDeserializationBackwardCompatibility(FAutomationTestBase& Test, const FStructSerializerNonLWCTypesTest& Struct1, const FStructSerializerLWCTypesTest& Struct2)
{
//Make comparison by casting the float (non-lwc) version up to double (lwc) since this is what will happen during deserialization
Test.TestEqual<FVector>(TEXT("Non-LWC Vector must be deserialized to a LWC Vector"), (FVector)Struct1.Vector, Struct2.Vector);
Test.TestEqual<FVector2D>(TEXT("Non-LWC Vector2D must be deserialized to a LWC Vector2D"), (FVector2D)Struct1.Vector2D, Struct2.Vector2D);
Test.TestEqual<FVector4>(TEXT("Non-LWC Vector4 must be deserialized toa LWC Vector4"), (FVector4)Struct1.Vector4, Struct2.Vector4);
Test.TestEqual<FMatrix>(TEXT("Non-LWC Matrix must be deserialized to a LWC Matrix"), (FMatrix)Struct1.Matrix, Struct2.Matrix);
Test.TestEqual<FPlane>(TEXT("Non-LWC Plane must be deserialized to a LWC Plane"), (FPlane)Struct1.Plane, Struct2.Plane);
Test.TestEqual<FQuat>(TEXT("Non-LWC Quat must be deserialized to a LWC Quat"), (FQuat)Struct1.Quat, Struct2.Quat);
Test.TestEqual<FRotator>(TEXT("Non-LWC Rotator must be deserialized to a LWC Rotator"), (FRotator)Struct1.Rotator, Struct2.Rotator);
Test.TestTrue(TEXT("Non-LWC Transform must be deserialized to a LWC Transform"), Struct2.Transform.Equals((FTransform)Struct1.Transform));
Test.TestEqual<FBox>(TEXT("Non-LWC Box must be deserialized to a LWC Box"), (FBox)Struct1.Box, Struct2.Box);
Test.TestEqual<FBox2D>(TEXT("Non-LWC Box2D must be deserialized to a LWC Box2D"), (FBox2D)Struct1.Box2D, Struct2.Box2D);
Test.TestEqual<FBoxSphereBounds>(TEXT("Non-LWC BoxSphereBounds must be deserialized to a LWC BoxSphereBounds"), (FBoxSphereBounds)Struct1.BoxSphereBounds, Struct2.BoxSphereBounds);
Test.TestEqual<float>(TEXT("Non-LWC struct float must be the same when deserialized to a LWC struct float"), Struct1.Float, Struct2.Float);
Test.TestEqual<double>(TEXT("Non-LWC struct double must be the same when deserialized to a LWC struct double"), Struct1.Double, Struct2.Double);
const bool bIsOrientedBoxEqual = FVector(Struct1.OrientedBox.AxisX) == Struct2.OrientedBox.AxisX
&& FVector(Struct1.OrientedBox.AxisY) == Struct2.OrientedBox.AxisY
&& FVector(Struct1.OrientedBox.AxisZ) == Struct2.OrientedBox.AxisZ
&& FVector(Struct1.OrientedBox.Center) == Struct2.OrientedBox.Center
&& Struct1.OrientedBox.ExtentX == Struct2.OrientedBox.ExtentX
&& Struct1.OrientedBox.ExtentY == Struct2.OrientedBox.ExtentY
&& Struct1.OrientedBox.ExtentZ == Struct2.OrientedBox.ExtentZ;
Test.TestTrue(TEXT("Non-LWC OrientedBox must be deserialized to a LWC OrientedBox"), bIsOrientedBoxEqual);
//Container testing
bool bAreArrayEqual = Struct1.VectorArray.Num() == Struct2.VectorArray.Num();
for (int32 Index = 0; Index < Struct1.VectorArray.Num() && bAreArrayEqual; ++Index)
{
if ((FVector)Struct1.VectorArray[Index] != Struct2.VectorArray[Index])
{
bAreArrayEqual = false;
}
}
Test.TestTrue(TEXT("Array of Non-LWC Vectors must be deserialized to an Array of LWC Vectors"), bAreArrayEqual);
bool bAreMapsEqual = Struct1.StrToVec.Num() == Struct2.StrToVec.Num();
for (const TPair<FString, FVector3f>& Struct1Pair : Struct1.StrToVec)
{
const FVector* Struct2Value = Struct2.StrToVec.Find(Struct1Pair.Key);
if (Struct2Value == nullptr)
{
bAreMapsEqual = false;
break;
}
const FVector Value = *Struct2Value;
if (Value != (FVector)Struct1Pair.Value)
{
bAreMapsEqual = false;
break;
}
}
Test.TestTrue(TEXT("Map of Non-LWC Vectors must be deserialized to a Map of LWC Vectors"), bAreMapsEqual);
bool bAreSetsEqual = Struct1.VectorSet.Num() == Struct2.VectorSet.Num();
for (const FVector3f& Vector : Struct1.VectorSet)
{
//Cast down like serialization has done
const FVector FloatVector = (FVector)Vector;
if (Struct2.VectorSet.Contains(FloatVector) == false)
{
bAreSetsEqual = false;
break;
}
}
Test.TestTrue(TEXT("Set of Non-LWC Vectors must be deserialized to a Set of LWC Vectors"), bAreSetsEqual);
}
void ValidateLWCTypes(FAutomationTestBase& Test, const FStructSerializerLWCTypesTest& Struct1, const FStructSerializerLWCTypesTest& Struct2)
{
Test.TestEqual<FVector>(TEXT("LWC Vector must be the same before and after de-serialization"), Struct1.Vector, Struct2.Vector);
Test.TestEqual<FVector2D>(TEXT("LWC Vector2D must be the same before and after de-serialization"), Struct1.Vector2D, Struct2.Vector2D);
Test.TestEqual<FVector4>(TEXT("LWC Vector4 must be the same before and after de-serialization"), Struct1.Vector4, Struct2.Vector4);
Test.TestEqual<FMatrix>(TEXT("LWC Matrix must be the same before and after de-serialization"), Struct1.Matrix, Struct2.Matrix);
Test.TestEqual<FPlane>(TEXT("LWC Plane must be the same before and after de-serialization"), Struct1.Plane, Struct2.Plane);
Test.TestEqual<FQuat>(TEXT("LWC Quat must be the same before and after de-serialization"), Struct1.Quat, Struct2.Quat);
Test.TestEqual<FRotator>(TEXT("LWC Rotator must be the same before and after de-serialization"), Struct1.Rotator, Struct2.Rotator);
Test.TestTrue(TEXT("LWC Transform must be the same before and after de-serialization"), Struct2.Transform.Equals(Struct1.Transform));
Test.TestEqual<FBox>(TEXT("LWC Box must be the same before and after de-serialization"), Struct1.Box, Struct2.Box);
Test.TestEqual<FBox2D>(TEXT("LWC Box2D must be the same before and after de-serialization"), Struct1.Box2D, Struct2.Box2D);
Test.TestEqual<FBoxSphereBounds>(TEXT("LWC BoxSphereBounds must be the same before and after de-serialization"), Struct1.BoxSphereBounds, Struct2.BoxSphereBounds);
Test.TestEqual<float>(TEXT("LWC struct float must be the same before and after de-serialization"), Struct1.Float, Struct2.Float);
Test.TestEqual<double>(TEXT("LWC struct double must be the same before and after de-serialization"), Struct1.Double, Struct2.Double);
const bool bIsOrientedBoxEqual = Struct1.OrientedBox.AxisX == Struct2.OrientedBox.AxisX
&& Struct1.OrientedBox.AxisY == Struct2.OrientedBox.AxisY
&& Struct1.OrientedBox.AxisZ == Struct2.OrientedBox.AxisZ
&& Struct1.OrientedBox.Center == Struct2.OrientedBox.Center
&& Struct1.OrientedBox.ExtentX == Struct2.OrientedBox.ExtentX
&& Struct1.OrientedBox.ExtentY == Struct2.OrientedBox.ExtentY
&& Struct1.OrientedBox.ExtentZ == Struct2.OrientedBox.ExtentZ;
Test.TestTrue(TEXT("LWC OrientedBox must be the same before and after de-serialization"), bIsOrientedBoxEqual);
Test.TestEqual<TArray<FVector>>(TEXT("LWC test - Arrays.VectorArray must be the same before and after de-/serialization"), Struct1.VectorArray, Struct2.VectorArray);
Test.TestTrue(TEXT("LWC test - Maps.StrToVec must be the same before and after de-/serialization"), Struct1.StrToVec.OrderIndependentCompareEqual(Struct2.StrToVec));
Test.TestTrue(TEXT("LWC test - Sets.VectorSet must be the same before and after de-/serialization"), Struct1.VectorSet.Num() == Struct2.VectorSet.Num() && Struct1.VectorSet.Difference(Struct2.VectorSet).Num() == 0);
}
template<typename TSerializerBackend, typename TDeserializerBackend>
void TestElementSerialization(FAutomationTestBase& Test)
{
// serialization
FStructSerializerTestStruct OriginalStruct;
UClass* MetaDataClass = LoadClass<UMetaData>(nullptr, TEXT("/Script/CoreUObject.MetaData"));
UMetaData* MetaDataObject = NewObject<UMetaData>();
// setup object tests
OriginalStruct.Objects.RawClass = MetaDataClass;
OriginalStruct.Objects.WrappedClass = MetaDataClass;
OriginalStruct.Objects.SubClass = MetaDataClass;
OriginalStruct.Objects.SoftClass = MetaDataClass;
OriginalStruct.Objects.RawObject = MetaDataObject;
OriginalStruct.Objects.WrappedObject = MetaDataObject;
OriginalStruct.Objects.WeakObject = MetaDataObject;
OriginalStruct.Objects.SoftObject = MetaDataObject;
OriginalStruct.Objects.ClassPath = MetaDataClass;
OriginalStruct.Objects.ObjectPath = MetaDataObject;
{
FStructSerializerPolicies Policies;
Policies.MapSerialization = EStructSerializerMapPolicies::Array;
FStructDeserializerPolicies DeserializerPolicies;
DeserializerPolicies.MissingFields = EStructDeserializerErrorPolicies::Warning;
DeserializerPolicies.MapPolicies = EStructDeserializerMapPolicies::Array;
//Numerics
{
FStructSerializerTestStruct TestStruct = OriginalStruct;
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerTestStruct, Numerics);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerTestStruct::StaticStruct(), Member);
FStructSerializer::SerializeElement(&TestStruct, Property, INDEX_NONE, SerializerBackend, Policies);
FStructSerializerTestStruct TestStruct2(NoInit);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerTestStruct::StaticStruct(), INDEX_NONE, DeserializerBackend, DeserializerPolicies));
ValidateNumerics(Test, TestStruct.Numerics, TestStruct2.Numerics);
}
//Booleans
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerTestStruct TestStruct = OriginalStruct;
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerTestStruct, Booleans);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerTestStruct::StaticStruct(), Member);
FStructSerializer::SerializeElement(&TestStruct, Property, INDEX_NONE, SerializerBackend, Policies);
FStructSerializerTestStruct TestStruct2(NoInit);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerTestStruct::StaticStruct(), INDEX_NONE, DeserializerBackend, DeserializerPolicies));
ValidateBooleans(Test, TestStruct.Booleans, TestStruct2.Booleans);
}
//Objects
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerTestStruct TestStruct = OriginalStruct;
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerTestStruct, Objects);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerTestStruct::StaticStruct(), Member);
FStructSerializer::SerializeElement(&TestStruct, Property, INDEX_NONE, SerializerBackend, Policies);
FStructSerializerTestStruct TestStruct2(NoInit);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerTestStruct::StaticStruct(), INDEX_NONE, DeserializerBackend, DeserializerPolicies));
ValidateObjects(Test, TestStruct.Objects, TestStruct2.Objects);
}
//Built ins
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerTestStruct TestStruct = OriginalStruct;
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerTestStruct, Builtins);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerTestStruct::StaticStruct(), Member);
FStructSerializer::SerializeElement(&TestStruct, Property, INDEX_NONE, SerializerBackend, Policies);
FStructSerializerTestStruct TestStruct2(NoInit);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerTestStruct::StaticStruct(), INDEX_NONE, DeserializerBackend, DeserializerPolicies));
ValidateBuiltIns(Test, TestStruct.Builtins, TestStruct2.Builtins);
}
//Arrays
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerTestStruct TestStruct = OriginalStruct;
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerTestStruct, Arrays);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerTestStruct::StaticStruct(), Member);
FStructSerializer::SerializeElement(&TestStruct, Property, INDEX_NONE, SerializerBackend, Policies);
FStructSerializerTestStruct TestStruct2(NoInit);
TestStruct2.Arrays.Int32Array.SetNumUninitialized(TestStruct.Arrays.Int32Array.Num());
TestStruct2.Arrays.ByteArray.SetNumUninitialized(TestStruct.Arrays.ByteArray.Num());
TestStruct2.Arrays.VectorArray.SetNumUninitialized(TestStruct.Arrays.VectorArray.Num());
TestStruct2.Arrays.StructArray.SetNumZeroed(TestStruct.Arrays.StructArray.Num());
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerTestStruct::StaticStruct(), INDEX_NONE, DeserializerBackend, DeserializerPolicies));
ValidateArrays(Test, TestStruct.Arrays, TestStruct2.Arrays);
}
//Maps
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerTestStruct TestStruct = OriginalStruct;
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerTestStruct, Maps);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerTestStruct::StaticStruct(), Member);
FStructSerializer::SerializeElement(&TestStruct, Property, INDEX_NONE, SerializerBackend, Policies);
FStructSerializerTestStruct TestStruct2(NoInit);
CopyKeys(TestStruct2.Maps.IntToStr, TestStruct.Maps.IntToStr);
CopyKeys(TestStruct2.Maps.StrToStr, TestStruct.Maps.StrToStr);
CopyKeys(TestStruct2.Maps.StrToStruct, TestStruct.Maps.StrToStruct);
CopyKeys(TestStruct2.Maps.StrToVec, TestStruct.Maps.StrToVec);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerTestStruct::StaticStruct(), INDEX_NONE, DeserializerBackend, DeserializerPolicies));
ValidateMaps(Test, TestStruct.Maps, TestStruct2.Maps);
}
//Sets
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerTestStruct TestStruct = OriginalStruct;
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerTestStruct, Sets);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerTestStruct::StaticStruct(), Member);
FStructSerializer::SerializeElement(&TestStruct, Property, INDEX_NONE, SerializerBackend, Policies);
FStructSerializerTestStruct TestStruct2(NoInit);
TestStruct2.Sets.IntSet = { -1, -2, -3 };
TestStruct2.Sets.NameSet = { TEXT("Pre1"), TEXT("Pre2") , TEXT("Pre3") };
TestStruct2.Sets.StrSet = { TEXT("Pre4"), TEXT("Pre5") , TEXT("Pre6"), TEXT("Pre7") };
TestStruct2.Sets.StructSet = { FStructSerializerBuiltinTestStruct(NoInit) };
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerTestStruct::StaticStruct(), INDEX_NONE, DeserializerBackend, DeserializerPolicies));
ValidateSets(Test, TestStruct.Sets, TestStruct2.Sets);
}
//TArray<uint8> element
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerArrayTestStruct TestStruct = OriginalStruct.Arrays;
FStructSerializerArrayTestStruct TestStruct2(NoInit);
TestStruct2.ByteArray.SetNumUninitialized(TestStruct.ByteArray.Num());
TestStruct2.ByteArray[0] = 89;
TestStruct2.ByteArray[1] = 91;
TestStruct2.ByteArray[2] = 93;
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerArrayTestStruct, ByteArray);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerArrayTestStruct::StaticStruct(), Member);
constexpr int32 TestIndex = 1;
FStructSerializer::SerializeElement(&TestStruct, Property, TestIndex, SerializerBackend, Policies);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerArrayTestStruct::StaticStruct(), TestIndex, DeserializerBackend, DeserializerPolicies));
Test.TestNotEqual<uint8>(TEXT("Arrays.ByteArray[0] must not be the same before and after de-/serialization of element 1"), TestStruct.ByteArray[0], TestStruct2.ByteArray[0]);
Test.TestEqual<uint8>(TEXT("Arrays.ByteArray[1] must be the same before and after de-/serialization of element 1"), TestStruct.ByteArray[TestIndex], TestStruct2.ByteArray[TestIndex]);
Test.TestNotEqual<uint8>(TEXT("Arrays.ByteArray[2] must not be the same before and after de-/serialization of element 1"), TestStruct.ByteArray[2], TestStruct2.ByteArray[2]);
}
//TArray<Struct> element
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerArrayTestStruct TestStruct = OriginalStruct.Arrays;
FStructSerializerArrayTestStruct TestStruct2(NoInit);
TestStruct2.StructArray.SetNumZeroed(TestStruct.StructArray.Num());
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerArrayTestStruct, StructArray);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerArrayTestStruct::StaticStruct(), Member);
constexpr int32 TestIndex = 1;
FStructSerializer::SerializeElement(&TestStruct, Property, TestIndex, SerializerBackend, Policies);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerArrayTestStruct::StaticStruct(), TestIndex, DeserializerBackend, DeserializerPolicies));
Test.TestFalse(TEXT("Arrays.StructArray[0] must not be the same before and after de-/serialization of element 1"), TestStruct.StructArray[0] == TestStruct2.StructArray[0]);
ValidateBuiltIns(Test, TestStruct.StructArray[TestIndex], TestStruct2.StructArray[TestIndex]);
}
//static single element
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerArrayTestStruct TestStruct = OriginalStruct.Arrays;
FStructSerializerArrayTestStruct TestStruct2(NoInit);
TestStruct2.StaticSingleElement[0] = 998;
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerArrayTestStruct, StaticSingleElement);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerArrayTestStruct::StaticStruct(), Member);
constexpr int32 TestIndex = 0;
FStructSerializer::SerializeElement(&TestStruct, Property, TestIndex, SerializerBackend, Policies);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerArrayTestStruct::StaticStruct(), TestIndex, DeserializerBackend, DeserializerPolicies));
Test.TestEqual<int32>(TEXT("Arrays.StaticSingleElement[0] must be the same before and after de-/serialization"), TestStruct.StaticSingleElement[TestIndex], TestStruct2.StaticSingleElement[TestIndex]);
}
//static float array element
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerArrayTestStruct TestStruct = OriginalStruct.Arrays;
FStructSerializerArrayTestStruct TestStruct2(NoInit);
FMemory::Memset(&TestStruct2.StaticFloatArray, 99, sizeof(TestStruct2.StaticFloatArray));
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerArrayTestStruct, StaticFloatArray);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerArrayTestStruct::StaticStruct(), Member);
constexpr int32 TestIndex = 1;
FStructSerializer::SerializeElement(&TestStruct, Property, TestIndex, SerializerBackend, Policies);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerArrayTestStruct::StaticStruct(), TestIndex, DeserializerBackend, DeserializerPolicies));
Test.TestNotEqual<int32>(TEXT("Arrays.StaticFloatArray[0] must not be the same before and after de-/serialization of element 1"), TestStruct.StaticFloatArray[0], TestStruct2.StaticFloatArray[0]);
Test.TestEqual<int32>(TEXT("Arrays.StaticFloatArray[1] must be the same before and after de-/serialization"), TestStruct.StaticFloatArray[TestIndex], TestStruct2.StaticFloatArray[TestIndex]);
Test.TestNotEqual<int32>(TEXT("Arrays.StaticFloatArray[2] must not be the same before and after de-/serialization of element 1"), TestStruct.StaticFloatArray[2], TestStruct2.StaticFloatArray[2]);
}
//TMap<int32, FString> element
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerMapTestStruct TestStruct = OriginalStruct.Maps;
FStructSerializerMapTestStruct TestStruct2(NoInit);
CopyKeys(TestStruct2.IntToStr, TestStruct.IntToStr);
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerMapTestStruct, IntToStr);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerMapTestStruct::StaticStruct(), Member);
constexpr int32 TestIndex = 1;
FStructSerializer::SerializeElement(&TestStruct, Property, TestIndex, SerializerBackend, Policies);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerMapTestStruct::StaticStruct(), TestIndex, DeserializerBackend, DeserializerPolicies));
TArray<int32> Keys;
Keys.Reserve(TestStruct.IntToStr.Num());
TestStruct.IntToStr.GenerateKeyArray(Keys);
Test.TestNotEqual<FString>(TEXT("Maps.IntToStr[0] must not be the same before and after de-/serialization of element 1"), TestStruct.IntToStr[Keys[0]], TestStruct2.IntToStr[Keys[0]]);
Test.TestEqual<FString>(TEXT("Maps.IntToStr[1] must be the same before and after de-/serialization of element 1"), TestStruct.IntToStr[Keys[TestIndex]], TestStruct2.IntToStr[Keys[TestIndex]]);
Test.TestNotEqual<FString>(TEXT("Maps.IntToStr[2] must not be the same before and after de-/serialization of element 1"), TestStruct.IntToStr[Keys[2]], TestStruct2.IntToStr[Keys[2]]);
}
//TMap<FString, FVector> element
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerMapTestStruct TestStruct = OriginalStruct.Maps;
FStructSerializerMapTestStruct TestStruct2(NoInit);
CopyKeys(TestStruct2.StrToVec, TestStruct.StrToVec);
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerMapTestStruct, StrToVec);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerMapTestStruct::StaticStruct(), Member);
constexpr int32 TestIndex = 1;
FStructSerializer::SerializeElement(&TestStruct, Property, TestIndex, SerializerBackend, Policies);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerMapTestStruct::StaticStruct(), TestIndex, DeserializerBackend, DeserializerPolicies));
TArray<FString> Keys;
Keys.Reserve(TestStruct.IntToStr.Num());
TestStruct.StrToVec.GenerateKeyArray(Keys);
Test.TestNotEqual<FVector>(TEXT("Maps.StrToVec[0] must not be the same before and after de-/serialization of element 1"), TestStruct.StrToVec[Keys[0]], TestStruct2.StrToVec[Keys[0]]);
Test.TestEqual<FVector>(TEXT("Maps.StrToVec[1] must be the same before and after de-/serialization of element 1"), TestStruct.StrToVec[Keys[TestIndex]], TestStruct2.StrToVec[Keys[TestIndex]]);
Test.TestNotEqual<FVector>(TEXT("Maps.StrToVec[2] must not be the same before and after de-/serialization of element 1"), TestStruct.StrToVec[Keys[2]], TestStruct2.StrToVec[Keys[2]]);
}
//TSet<FName> element
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
TSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
TDeserializerBackend DeserializerBackend(Reader);
FStructSerializerSetTestStruct TestStruct = OriginalStruct.Sets;
FStructSerializerSetTestStruct TestStruct2(NoInit);
TestStruct2.NameSet = { TEXT("Pre1"), TEXT("Pre2") , TEXT("Pre3") };
const FName Member = GET_MEMBER_NAME_CHECKED(FStructSerializerSetTestStruct, NameSet);
FProperty* Property = FindFProperty<FProperty>(FStructSerializerSetTestStruct::StaticStruct(), Member);
constexpr int32 TestIndex = 1;
FStructSerializer::SerializeElement(&TestStruct, Property, TestIndex, SerializerBackend, Policies);
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::DeserializeElement(&TestStruct2, *FStructSerializerSetTestStruct::StaticStruct(), TestIndex, DeserializerBackend, DeserializerPolicies));
TArray<FName> SetArray1 = TestStruct.NameSet.Array();
TArray<FName> SetArray2 = TestStruct2.NameSet.Array();
Test.TestNotEqual<FName>(TEXT("Sets.NameSet[0] must not be the same before and after de-/serialization of element 1"), SetArray1[0], SetArray2[0]);
Test.TestEqual<FName>(TEXT("Sets.NameSet[1] must be the same before and after de-/serialization of element 1"), SetArray1[TestIndex], SetArray2[TestIndex]);
Test.TestNotEqual<FName>(TEXT("Sets.NameSet[2] must not be the same before and after de-/serialization of element 1"), SetArray1[2], SetArray2[2]);
}
}
}
void TestSerialization( FAutomationTestBase& Test, IStructSerializerBackend& SerializerBackend, IStructDeserializerBackend& DeserializerBackend )
{
// serialization
FStructSerializerTestStruct TestStruct;
UClass* MetaDataClass = LoadClass<UMetaData>(nullptr, TEXT("/Script/CoreUObject.MetaData"));
UMetaData* MetaDataObject = NewObject<UMetaData>();
// setup object tests
TestStruct.Objects.RawClass = MetaDataClass;
TestStruct.Objects.WrappedClass = MetaDataClass;
TestStruct.Objects.SubClass = MetaDataClass;
TestStruct.Objects.SoftClass = MetaDataClass;
TestStruct.Objects.RawObject = MetaDataObject;
TestStruct.Objects.WrappedObject = MetaDataObject;
TestStruct.Objects.WeakObject = MetaDataObject;
TestStruct.Objects.SoftObject = MetaDataObject;
TestStruct.Objects.ClassPath = MetaDataClass;
TestStruct.Objects.ObjectPath = MetaDataObject;
{
FStructSerializer::Serialize(TestStruct, SerializerBackend);
}
// deserialization
FStructSerializerTestStruct TestStruct2(NoInit);
{
FStructDeserializerPolicies Policies;
Policies.MissingFields = EStructDeserializerErrorPolicies::Warning;
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::Deserialize(TestStruct2, DeserializerBackend, Policies));
}
// test numerics
ValidateNumerics(Test, TestStruct.Numerics, TestStruct2.Numerics);
// test booleans
ValidateBooleans(Test, TestStruct.Booleans, TestStruct2.Booleans);
// test objects
ValidateObjects(Test, TestStruct.Objects, TestStruct2.Objects);
// test built-ins
ValidateBuiltIns(Test, TestStruct.Builtins, TestStruct2.Builtins);
// test arrays
ValidateArrays(Test, TestStruct.Arrays, TestStruct2.Arrays);
// test maps
ValidateMaps(Test, TestStruct.Maps, TestStruct2.Maps);
// test sets
ValidateSets(Test, TestStruct.Sets, TestStruct2.Sets);
//Test LWC types with standard de-serialization
ValidateLWCTypes(Test, TestStruct.LWCTypes, TestStruct2.LWCTypes);
}
void TestLWCSerialization(FAutomationTestBase& Test, IStructSerializerBackend& SerializerBackend, IStructDeserializerBackend& DeserializerBackend)
{
// Serialization of LWC struct into non-LWC mode to mimick sending to older UE
FStructSerializerLWCTypesTest TestLWCStruct;
{
FStructSerializer::Serialize(TestLWCStruct, SerializerBackend);
}
// Deserialization into non-LWC to mimick reception in an older UE
FStructSerializerNonLWCTypesTest TestNonLWCStruct(NoInit);
{
FStructDeserializerPolicies Policies;
Policies.MissingFields = EStructDeserializerErrorPolicies::Warning;
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::Deserialize(TestNonLWCStruct, DeserializerBackend, Policies));
}
ValidateLWCSerializationBackwardCompatibility(Test, TestLWCStruct, TestNonLWCStruct);
}
void TestLWCDeserialization(FAutomationTestBase& Test, IStructSerializerBackend& SerializerBackend, IStructDeserializerBackend& DeserializerBackend)
{
// Serialization of non lwc struct to mimick a struct coming from older UE
FStructSerializerNonLWCTypesTest TestNonLWCStruct;
{
FStructSerializer::Serialize(TestNonLWCStruct, SerializerBackend);
}
// Deserialization into LWC type to mimick reception into a newer UE
FStructSerializerLWCTypesTest TestLWCStruct(NoInit);
{
FStructDeserializerPolicies Policies;
Policies.MissingFields = EStructDeserializerErrorPolicies::Warning;
Test.TestTrue(TEXT("Deserialization must succeed"), FStructDeserializer::Deserialize(TestLWCStruct, DeserializerBackend, Policies));
}
ValidateLWCDeserializationBackwardCompatibility(Test, TestNonLWCStruct, TestLWCStruct);
}
}
/* Tests
*****************************************************************************/
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
IMPLEMENT_SIMPLE_AUTOMATION_TEST(FStructSerializerTest, "System.Core.Serialization.StructSerializer", EAutomationTestFlags::EditorContext | EAutomationTestFlags::EngineFilter)
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
bool FStructSerializerTest::RunTest( const FString& Parameters )
{
const EStructSerializerBackendFlags TestFlags = EStructSerializerBackendFlags::Default;
// json
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
FJsonStructSerializerBackend SerializerBackend(Writer, TestFlags);
FJsonStructDeserializerBackend DeserializerBackend(Reader);
StructSerializerTest::TestSerialization(*this, SerializerBackend, DeserializerBackend);
// uncomment this to look at the serialized data
//GLog->Logf(TEXT("%s"), (TCHAR*)Buffer.GetData());
}
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
// cbor
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
FCborStructSerializerBackend SerializerBackend(Writer, TestFlags);
Copying //UE4/Dev-Enterprise to //UE4/Dev-Main (Source: //UE4/Dev-Enterprise @ 4341740) #lockdown Nick.Penwarden #rb none ============================ MAJOR FEATURES & CHANGES ============================ Change 4280523 by Patrick.Boutot Add option in AjaCustomTimeStep to wait until the frame to be ready. Previously, the frame was there but not yet processed so it was possible that it was not ready by the time we wanted to read it. It won't work with interlaced because the 2 fields are processed at the same time. In interlaced, will get a 30fps behaviour when we actually want a 60fps. Fix bug that didn't set and reset bIsOwned properly when it was first initialized as not owned. Change 4280526 by Patrick.Boutot Add accessor to get the leaf media source or output. Change 4280624 by Patrick.Boutot Add timecode acessor to media samples Change 4280626 by Patrick.Boutot Rework the timing for AJA Media Player. Previously, we took the timing of the frame. That was a bad idea because if 2 incomings video frames were coming a the same time, you would only show one. Making the buffering system useless. That affects the Custom Time Step since it was waiting for the interrupt signal and in some behavior we would like the frame to be ready to be used by UE. Same the timecode in the MediaSample because we may not used it to stamps the frame. Change 4283022 by Patrick.Boutot [EditorScriptingUtilitites] Check folder names invalid characters separatly from the object's name. #jira UE-59886, UE-62333 Change 4283112 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Rename TimemanagemenetEditor module names. Change 4283426 by JeanLuc.Corenthin Fix crash with FBX file #jira UE-62501 Change 4284940 by Patrick.Boutot A widget that let you select a single permutation from a list. It groups the values into categories and removes duplicates inside that category. Change 4285471 by Patrick.Boutot Remove MediaFrameworkUtilititesModule dependency to the Settings module at runtime. Change 4286925 by Patrick.Boutot [AJA] Add support to read LTC from the reference In. Add more detail on video format and the device. MediaSource use the Permutations Selection widget to select his mode and device. Remove debugging option to trigger an AJA custom time step and timecode provider. Remove the UYVY pixel option from AJA. It's better do to the conversion on the AJA card that on the GPU. Change the tooltip and category for some AjaMediaSource properties. Change 4287026 by Julien.StJean Modifed the file STimeCodeProviderTab.cpp to fix the position of a SComboButton that wasn't properly place. Change 4287663 by Jon.Nabozny Add timecode messages into nDisplay, and sync those between Master and Slave Change 4287884 by Jon.Nabozny Create a TimecodeProvider for SystemTime and introduce a notion for DefaultTimecodeProvider in Engine. Change 4288050 by Jon.Nabozny Rework the TimeSynchronization implementation for usability and functionality. Change 4288283 by Jon.Nabozny Fixed swapped MetaClass and DisplayName options on UEngine::DefaultTimecodeProviderClassName; Change 4288352 by Jon.Nabozny Set TimecodeProviderClassName and DefaultTimecodeProviderClassName in BaseEngine.ini Change 4288378 by Jon.Nabozny Fixup some issues in TimecodeSynchronizer where code was reset improperly due to multiple unshelves / resolves. Change 4288394 by Jon.Nabozny Add TimeSync functionality into LiveLink. Also add test cases for this. This should allow us to easily synchronize multiple LiveLink sources together, as well as synchronize those to anything else using the sync system (Relies on CL-4235417) Change 4288899 by Patrick.Boutot Fix initialization order of FMediaIOCorePlayerBase variables Change 4289157 by Patrick.Boutot Allow the user to change the source of a capture without stopping the current capture. [AJA] AjaMediaCapture, add support for UpdateSceneViewport & UpdateRenderTarget @made by julien.stjean Change 4291328 by Jon.Nabozny Report the Skeleton Guid with TimeSyncData and track sync state in LiveLinkTimeSynchronizationSource. This prevents a crash that can happen if a source is quickly cleared and reset before the next tick of Time Synchronization. Change 4296294 by Jon.Nabozny Fixup errors when TimecodeProviderClassName is empty. It's valid to leave this empty. Change 4297122 by Patrick.Boutot Media Profile with timecode provider & custom time step Change 4301855 by Austin.Crismore Fix for movment scaling and virtual joystick controls. Movement scaling in for truck and dolly is locked to the world xy plane, and virtual joysticks use their own method for movement scaling now. #jira UE-61762, UE-62187 Change 4301856 by Austin.Crismore Virtual sequence level controller now listens to on object spawned, so that it can intercept the camera actor and disable attatching to HMD to prevent camera movement that isn't from the level sequence #jira UE-61766 Change 4301860 by Austin.Crismore Fix for touch scrubbing. Added default values back in. Added logic to only allow scrubbing when touch focus was off. #jira UE-61865 Change 4302294 by Jamie.Dale Added functions to get your the localized spoken and subtitle text from a dialogue wave Change 4304393 by Jamie.Dale Added support for BlueprintAssignable properties in Python Change 4305852 by Jamie.Dale Removed hard-dependency between EditorScriptingUtilities and PythonScriptPlugin Backed-out changelist 4259264 and query Python availability based on whether anything is available to handle the command #jira UE-62318 Change 4308550 by Jamie.Dale Fixed crash when passing a null world to Python actor iterators Change 4311867 by Homam.Bahnassi Revit master material with exposed parameters matching the API when possible. Change 4314428 by Francis.Hurteau Made the usage of the bBuildDeveloperTools switch independent of the bCompileAgainstEngine switch. Changed bBuildDeveloperTools TargetRule in UnrealBuildTool to a nullable to keep the old behavior in case where bBuildDeveloperTools wasn't explicitly set in TargetRules Change 4315134 by Jamie.Dale Defer editable text focus selection until mouse-up to allow the user to make an initial selection #jira UE-58086 Change 4318615 by Johan.Duparc EditorFactories: consistent return values after asset import. Change 4322459 by Jamie.Dale Made SequencerScripting an Editor plugin as it depends on PythonScriptPlugin which is an Editor plugin This was causing issues at runtime when SequencerScripting was enabled, as it failed to load PythonScriptPlugin (which hadn't been built). Change 4323341 by Francis.Hurteau Implement proper message bus protocol version negociation with static nodes Change 4323733 by Francis.Hurteau Fix VR Pausing Sequence Scrubbing just setting playback speed to 0.0 Change 4324319 by Jamie.Dale Exposed transactions to Blueprints Change 4325847 by Alistair.White Copying //Tasks/UE4/Private-PixelStreaming@4325566 to Dev-Enterprise-Minimal (//UE4/Dev-Enterprise-Minimal) This adds the new experimental PixelStreaming plugin to allow streaming of an Unreal client's audio & video stream to a browser through the WebRTC protocol to support new uses for enterprise customers. Change 4326282 by Simon.Tourangeau nDisplay native present handler Change 4326581 by Jamie.Dale Replacing FDateTime with int64 Ticks value to workaround UE-63485 Change 4326599 by Homam.Bahnassi Moving texture coords outside UVEdit function to allow using different UV channels. Change 4333250 by Francis.Hurteau Small TFuture changes: * cleans up TFuture::Then with usage of TUniqueFunction * added TFuture::Reset to invalidate it and remove continuation from a future shared state Change 4333359 by Homam.Bahnassi Support scaling and rotating UVs around arbitrary pivot Change 4333566 by Johan.Duparc Expose ProxyLOD functionalities to Scripting #jira UEENT-1788 Change 4333988 by Jamie.Dale Allow UHT to parse FText default parameter values INVTEXT, NSLOCTEXT, LOCTABLE, and FText::GetEmpty() are supported. LOCTEXT isn't as it relies on an external macro that is known to C++ but not to UHT (NSLOCTEXT can easily be used instead). Change 4335020 by Francis.Hurteau Uncomment MessageBus::Send deprecation notice for 4.21 Update MessageBus Send usage to new API Change 4335195 by JeanMichel.Dignard Add a SetLodFromStaticMesh script utility function #jira UEENT-1789 Change 4335231 by Anousack.Kitisa Added functions to generate planar, cylindrical, box UV mapping. #jira UEENT-1598 Change 4335373 by Jamie.Dale Cleaned up some places creating empty literal texts Change 4335458 by Jamie.Dale Allow UHT to parse FText() as an alias of FText::GetEmpty() when processing default values Change 4335875 by Max.Chen Sequencer: Clear RF_Transient on pasted tracks/sections #jira UE-63537 Change 4336497 by Johan.Duparc ProxyLOD: Fix progress bar issue - removed duplicated code - removed duplicated LongTask object #jira UEENT-1788 Change 4336723 by Jamie.Dale Ensure that Python generated types create their CDO at the correct point #jira UE-62895 Change 4340594 by Ben.Marsh Fix manifest being invalidated when building two enterprise targets in a row. Fixes CIS error. #jira UE-63644 [CL 4342443 by JeanMichel Dignard in Main branch]
2018-09-04 16:35:02 -04:00
FCborStructDeserializerBackend DeserializerBackend(Reader);
StructSerializerTest::TestSerialization(*this, SerializerBackend, DeserializerBackend);
}
// cbor standard compliant endianness (big endian)
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
FCborStructSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default | EStructSerializerBackendFlags::WriteCborStandardEndianness);
FCborStructDeserializerBackend DeserializerBackend(Reader, ECborEndianness::StandardCompliant);
StructSerializerTest::TestSerialization(*this, SerializerBackend, DeserializerBackend);
}
// cbor LWC (UE5) to NonLWC (UE4)
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
FCborStructSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::LegacyUE4 | EStructSerializerBackendFlags::WriteCborStandardEndianness);
constexpr bool bIsLWCCompatibilityMode = false;
FCborStructDeserializerBackend DeserializerBackend(Reader, ECborEndianness::StandardCompliant, bIsLWCCompatibilityMode);
StructSerializerTest::TestLWCSerialization(*this, SerializerBackend, DeserializerBackend);
}
// cbor Non LWC (UE4) to LWC (UE5)
{
TArray<uint8> Buffer;
FMemoryReader Reader(Buffer);
FMemoryWriter Writer(Buffer);
FCborStructSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::LegacyUE4 | EStructSerializerBackendFlags::WriteCborStandardEndianness);
constexpr bool bIsLWCCompatibilityMode = true;
FCborStructDeserializerBackend DeserializerBackend(Reader, ECborEndianness::StandardCompliant, bIsLWCCompatibilityMode);
StructSerializerTest::TestLWCDeserialization(*this, SerializerBackend, DeserializerBackend);
}
return true;
}
Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2771249 on 2015/11/18 by Joe.Tidmarsh Ensure that UCircularThrobber's Radius determines the widget's desired size when a child of UCanvasPanelSlot. #jira UE-23186 Change 2794402 on 2015/12/08 by Joe.Tidmarsh Reverting recent changes to Circular throbber. It's unintuative to enforce Size To Content. Will find some other solution. Change 2803507 on 2015/12/15 by Richard.TalbotWatkin BSP poly extrusion can now only be done in the normal direction of the poly. #jira UE-24168 - BSP face breaks off when extruding on Y or Z axes Change 2803510 on 2015/12/15 by Richard.TalbotWatkin Building new static mesh LODs now initializes override vertex colors based on LOD0. #jira UE-23747 - CLONE - if LODs are generated for meshes with vertex colors in a level the vertex colors dont propagate to the LOD in the level Change 2808877 on 2015/12/18 by Alexis.Matte Make sure the delta scale sign is swap when we have multiple axis with different sign current axis value #jira UE-21574 #codereview nick.darnell Change 2810114 on 2015/12/21 by Alexis.Matte #jira UE-23769 We now expose a message telling the user that we found some mesh that are not reference by any scene node in the fbx file. #codereview nick.darnell Change 2810211 on 2015/12/21 by Richard.TalbotWatkin Fixed issue with Show Only Selected not showing members of actor groups. #jira UE-24453 - CLONE - Show Selected is broken for certain Orion meshes Change 2811035 on 2015/12/22 by Alexis.Matte #jira UE-24671 Polish UI #codereview nick.darnell Change 2811123 on 2015/12/22 by Alexis.Matte #jira UE-21936 We now can decide which fbx sdk compatibility version we can use when exportting to a fbx file. #codereview nick.darnell Change 2812830 on 2015/12/28 by Richard.TalbotWatkin Prevent engine assets' properties from having project assets assigned to them. #jira UE-18215 - Details panel: prevent engine content from referencing game content Change 2812854 on 2015/12/28 by Richard.TalbotWatkin Fixed issue where floating windows were having their border size erroneously added again and again. Allowed PIE windows to not respect work area bounds if they are created centered, so that they can overlap off the edge of the screen. #jira UE-24465 - 10 Pixels Added to Width & Height of Floating Editor Windows Each Time Project is Reopened #jira UE-24364 - "Always Center Window to Screen" No Longer Functioning in New Editor Window (PIE) Change 2812875 on 2015/12/28 by Alexis.Matte #jira ue-22237 first implementation for skeletal mesh scene import and reimport. Small refator to remove duplicate code in different fbx list ui. #codereview nick.darnell Change 2813172 on 2015/12/29 by Alexis.Matte #jira ue-21656 Partial submit, the base code is there to add all light type with there properties. #codereview nick.darnell Change 2813403 on 2015/12/30 by Richard.TalbotWatkin PIE in New Editor Window now respects the Game Gets Mouse Control setting. This provides a workaround for UE-24824 where attempting to drag a PIE window fails due to the viewport capturing and locking the mouse to itself in FSceneViewport::OnFocusReceived. Change 2813429 on 2015/12/30 by Alexis.Matte #jira ue-21656 -spotlight and point light support fbx attenuation -fix the light orientation so now directional and spotlight point to the same direction of the fbx #codereview nick.darnell Change 2813456 on 2015/12/30 by Alexis.Matte #jira ue-21656 -Import the camera from fbx #codereview nick.darnell Change 2813457 on 2015/12/30 by Richard.TalbotWatkin Fixed issues with the code which determines whether the user is attempting to assign a game asset/class to an engine asset's property. #jira UE-18215 - Details panel: prevent engine content from referencing game content Change 2813475 on 2015/12/30 by Richard.TalbotWatkin Removed erroneous debug code. Change 2814451 on 2016/01/04 by Joe.Tidmarsh Fixed Tint colour for circular throbber. #jira UE-24445 Change 2814546 on 2016/01/04 by Richard.TalbotWatkin Force Message Log to update its category list if a new category is added while it is open. #jira UE-24266 - Message Log not updating Categories in Real-Time Change 2814613 on 2016/01/04 by Alexis.Matte [CL 2851481 by Nick Darnell in Main branch]
2016-02-01 14:57:29 -05:00
IMPLEMENT_SIMPLE_AUTOMATION_TEST(FStructElementSerializerTest, "System.Core.Serialization.StructElementSerializer", EAutomationTestFlags::EditorContext | EAutomationTestFlags::EngineFilter)
bool FStructElementSerializerTest::RunTest(const FString& Parameters)
{
//Element de/serialization for both types of backend
{
StructSerializerTest::TestElementSerialization<FJsonStructSerializerBackend, FJsonStructDeserializerBackend>(*this);
StructSerializerTest::TestElementSerialization<FCborStructSerializerBackend, FCborStructDeserializerBackend>(*this);
}
return true;
}
IMPLEMENT_SIMPLE_AUTOMATION_TEST(FStructSerializerCborByteArrayTest, "System.Core.Serialization.StructSerializerCborByteArray", EAutomationTestFlags::EditorContext | EAutomationTestFlags::EngineFilter)
bool FStructSerializerCborByteArrayTest::RunTest( const FString& Parameters )
{
// Ensure TArray<uint8>/TArray<int8> are written as CBOR byte string (~2x more compact) by default rather than a CBOR array.
{
static_assert((EStructSerializerBackendFlags::Default & EStructSerializerBackendFlags::WriteByteArrayAsByteStream) == EStructSerializerBackendFlags::WriteByteArrayAsByteStream, "Test below expects 'EStructSerializerBackendFlags::Default' to contain 'EStructSerializerBackendFlags::WriteByteArrayAsByteStream'");
// Serialization
TArray<uint8> Buffer;
FMemoryWriter Writer(Buffer);
FCborStructSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
FStructSerializerByteArray WrittenStruct;
FStructSerializer::Serialize(WrittenStruct, SerializerBackend);
TestTrue(TEXT("Arrays of int8/uint8 must be encoded in byte string (compact)"), Buffer.Num() == 54); // Copy the 54 bytes from VC++ Memory viewer to CBOR playground http://cbor.me/ to validate the count/content.
// Deserialization
FMemoryReader Reader(Buffer);
FCborStructDeserializerBackend DeserializerBackend(Reader);
FStructDeserializerPolicies Policies;
Policies.MissingFields = EStructDeserializerErrorPolicies::Warning;
FStructSerializerByteArray ReadStruct(NoInit);
FStructDeserializer::Deserialize(ReadStruct, DeserializerBackend, Policies);
TestTrue(TEXT("Value before TArray<uint8> must be the same before and after de-/serialization."), ReadStruct.Dummy1 == 1);
TestTrue(TEXT("Value after TArray<uint8> must be the same before and after de-/serialization."), ReadStruct.Dummy2 == 2);
TestTrue(TEXT("Value after TArray<int8> must be the same before and after de-/serialization."), ReadStruct.Dummy3 == 3);
TestTrue(TEXT("Array uint8 must be the same before and after de-/serialization"), WrittenStruct.ByteArray == ReadStruct.ByteArray);
TestTrue(TEXT("Array int8 must be the same before and after de-/serialization"), WrittenStruct.Int8Array == ReadStruct.Int8Array);
}
// Ensure TArray<uint8>/TArray<int8> encoded in CBOR byte string are skipped on deserialization if required by the policy.
{
// Serialization
TArray<uint8> Buffer;
FMemoryWriter Writer(Buffer);
FCborStructSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
FStructSerializerByteArray WrittenStruct;
FStructSerializer::Serialize(WrittenStruct, SerializerBackend);
// Deserialization
FMemoryReader Reader(Buffer);
FCborStructDeserializerBackend DeserializerBackend(Reader);
// Skip the array properties named "ByteArray" and "Int8Array".
FStructDeserializerPolicies Policies;
Policies.PropertyFilter = [](const FProperty* CurrentProp, const FProperty* ParentProp)
{
const bool bFilteredOut = (CurrentProp->GetFName() == FName(TEXT("ByteArray")) || CurrentProp->GetFName() == FName(TEXT("Int8Array")));
return !bFilteredOut;
};
Policies.MissingFields = EStructDeserializerErrorPolicies::Warning;
FStructSerializerByteArray ReadStruct(NoInit);
FStructDeserializer::Deserialize(ReadStruct, DeserializerBackend, Policies);
TestTrue(TEXT("Per deserializer policy, value before TArray<uint8> must be the same before and after de-/serialization."), ReadStruct.Dummy1 == 1);
TestTrue(TEXT("Per deserializer policy, value after TArray<uint8> must be the same before and after de-/serialization."), ReadStruct.Dummy2 == 2);
TestTrue(TEXT("Per deserializer policy, value after TArray<int8> must be the same before and after de-/serialization."), ReadStruct.Dummy3 == 3);
TestTrue(TEXT("Per deserializer policy, TArray<uint8> must be skipped on deserialization"), ReadStruct.ByteArray.Num() == 0);
TestTrue(TEXT("Per deserializer policy, TArray<int8> must be skipped on deserialization"), ReadStruct.Int8Array.Num() == 0);
}
// Ensure empty TArray<uint8>/TArray<int8> are written as zero-length CBOR byte string.
{
// Serialization
TArray<uint8> Buffer;
FMemoryWriter Writer(Buffer);
FCborStructSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Default);
FStructSerializerByteArray WrittenStruct(NoInit); // Keep the TArray<> empty.
WrittenStruct.Dummy1 = 1;
WrittenStruct.Dummy2 = 2;
WrittenStruct.Dummy3 = 3;
FStructSerializer::Serialize(WrittenStruct, SerializerBackend);
TestTrue(TEXT("Arrays of int8/uint8 must be encoded in byte string (compact)"), Buffer.Num() == 48); // Copy the 48 bytes from VC++ Memory viewer to CBOR playground http://cbor.me/ to validate the count/content.
// Deserialization
FMemoryReader Reader(Buffer);
FCborStructDeserializerBackend DeserializerBackend(Reader);
FStructDeserializerPolicies Policies;
Policies.MissingFields = EStructDeserializerErrorPolicies::Warning;
FStructSerializerByteArray ReadStruct(NoInit);
FStructDeserializer::Deserialize(ReadStruct, DeserializerBackend, Policies);
TestTrue(TEXT("Value before TArray<uint8> must be the same before and after de-/serialization."), ReadStruct.Dummy1 == 1);
TestTrue(TEXT("Value after TArray<uint8> must be the same before and after de-/serialization."), ReadStruct.Dummy2 == 2);
TestTrue(TEXT("Value after TArray<int8> must be the same before and after de-/serialization."), ReadStruct.Dummy3 == 3);
TestTrue(TEXT("Array uint8 must be the same before and after de-/serialization"), WrittenStruct.ByteArray == ReadStruct.ByteArray);
TestTrue(TEXT("Array int8 must be the same before and after de-/serialization"), WrittenStruct.Int8Array == ReadStruct.Int8Array);
}
// Ensure TArray<uint8>/TArray<int8> CBOR serialization is backward compatible. (Serializer can write the old format and deserializer can read it)
{
static_assert((EStructSerializerBackendFlags::Legacy & EStructSerializerBackendFlags::WriteByteArrayAsByteStream) == EStructSerializerBackendFlags::None, "Test below expects 'EStructSerializerBackendFlags::Legacy' to not have 'EStructSerializerBackendFlags::WriteByteArrayAsByteStream'");
// Serialize TArray<uint8>/TArray<int8> it they were prior 4.25. (CBOR array rather than CBOR byte string)
TArray<uint8> Buffer;
FMemoryWriter Writer(Buffer);
FCborStructSerializerBackend SerializerBackend(Writer, EStructSerializerBackendFlags::Legacy); // Legacy mode doesn't enable EStructSerializerBackendFlags::WriteByteArrayAsByteStream.
FStructSerializerByteArray WrittenStruct;
FStructSerializer::Serialize(WrittenStruct, SerializerBackend);
TestTrue(TEXT("Backward compatibility: Serialized size check"), Buffer.Num() == 60); // Copy the 60 bytes from VC++ Memory viewer to CBOR playground http://cbor.me/ to validate the count/content.
// Deserialize TArray<uint8>/TArray<int8> as they were prior 4.25.
FMemoryReader Reader(Buffer);
FCborStructDeserializerBackend DeserializerBackend(Reader);
FStructDeserializerPolicies Policies;
Policies.MissingFields = EStructDeserializerErrorPolicies::Warning;
FStructSerializerByteArray ReadStruct(NoInit);
FStructDeserializer::Deserialize(ReadStruct, DeserializerBackend, Policies);
TestTrue(TEXT("Backward compatibility: Integer must be the same before and after de-/serialization."), ReadStruct.Dummy1 == 1);
TestTrue(TEXT("Backward compatibility: Integer must be the same before and after de-/serialization."), ReadStruct.Dummy2 == 2);
TestTrue(TEXT("Backward compatibility: Integer must be the same before and after de-/serialization."), ReadStruct.Dummy3 == 3);
TestTrue(TEXT("Backward compatibility: TArray<uint8> must be readable as CBOR array of number."), WrittenStruct.ByteArray == ReadStruct.ByteArray);
TestTrue(TEXT("Backward compatibility: TArray<int8> must be readable as CBOR array of number."), WrittenStruct.Int8Array == ReadStruct.Int8Array);
}
return true;
}
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#endif //WITH_DEV_AUTOMATION_TESTS