You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Code/Framework/AzCore/Tests
SJ c871224dae
Support for importing Json files (#4609)
* Initial support for importing Json files within other Json files

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add some test cases for testing/iterating on the Json import work. Fix MacOS AzTestRunner module loading bug.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* The import resolver can take the allocator as a parameter to Load/StoreImports() instead of storing a copy.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Fix assert

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Some rework of the JsonImport feature. Base test cases pass. More complex test cases need to be added.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Add test case for testing nested imports.
2. Initialize rapidjson value to fix assert.
3. Fix bug found in merge patch creation.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Update the Resolver class member functions to return proper result codes.
2. Add the wrapper functions for resolving/restoring imports to the JsonSerialization class.
3. Add new test case.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add test cases for import + patches. Fix bug found when patching import. Rename test cases.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Add ApplyPatch() function to BaseJsonImporter.
2. Move patch logic out of ResolveImport() and into ApplyPatch()
3. Get rid of the custom RestoreImport implementation in the tests since it was the same as the base version.
4. Add test case for patching nested imports.
5. Update merge patch outcome reporting logic to work for nested object patches.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Add a CreatePatch() function to BaseJsonImporter to match the ApplyPatch() function.
2. Reorganize some responsibilities between RestoreImports(), RestoreImport() and CreatePatch() to make ResolveImports() and RestoreImports() more symmetrical.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Combine result code in code path where we add empty object to path

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add test case for inserting a new import into an existing object.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Use == instead of Compare() for comparing file paths.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Address some PR feedback.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Address additional PR feedback

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add missing includes to fix non-unity build

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Fix build error. Address additional feedback.

Signed-off-by: amzn-sj <srikkant@amazon.com>
4 years ago
..
AZStd Changes GTEST_OS_SUPPORTS_DEATH_TEST to the right define which is GTEST_HAS_DEATH_TEST 4 years ago
AZTestShared Code/Framework fixes 4 years ago
Asset Remove old "Integ" functionality from tests (#4688) 4 years ago
Console Fixes debug console autocomplete issues (#4223) 4 years ago
Debug Remove old "Integ" functionality from tests (#4688) 4 years ago
EBus Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
IO Update the FileIO Aliases (#4186) 4 years ago
Math Merge branch 'development' into cmake/warn_virtual 4 years ago
Memory Changes GTEST_OS_SUPPORTS_DEATH_TEST to the right define which is GTEST_HAS_DEATH_TEST 4 years ago
Name Implemented C++23 deleted nullptr_t constructor/assignment for AZStd string classes (#4158) 4 years ago
Platform Remove old "Integ" functionality from tests (#4688) 4 years ago
RTTI Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Serialization/Json Support for importing Json files (#4609) 4 years ago
Settings Added anchor key parameter to the SettingsRegistry MergeSettings (#4650) 4 years ago
Streamer Modernization + AZStd::function compare fix. (#3680) 4 years ago
Time Some shutdown crash fixes, reverted a whitespace, and added some basic unit tests for time additions 4 years ago
AssetJsonSerializerTests.cpp {lyn7283} added test for assetHint Json Serialzier callback logic (#4586) 4 years ago
AssetManager.cpp Cleanup SerializeContext.h pt.1 (#4264) 4 years ago
AssetSerializerTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
AzEnumTest.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
BehaviorContext.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
BehaviorContextFixture.h Add preliminary budget tracking system and remove driller integration 4 years ago
Components.cpp Add AZ_BUDGET_DEFINE/AZ_BUDGET_DECLARE and remove driller 4 years ago
DLL.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
DLLMainTest.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Debug.cpp Deprecate profiler categories based on global enum 4 years ago
EBus.cpp Added a ThreadDispatch Policy to the EBus code (#4405) 4 years ago
EntityIdTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
EntityTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
EnumTests.cpp more fixes for Code 4 years ago
EventTests.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
FileIOBaseTestTypes.h Update the FileIO Aliases (#4186) 4 years ago
FixedWidthIntegers.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
GenericStreamMock.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
GenericStreamTests.cpp more fixes for Code 4 years ago
Geometry2DUtils.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
IPC.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Interface.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
IntersectPoint.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
JSON.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Jobs.cpp Fixes AzCore for MSVC 4 years ago
Main.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Memory.cpp Archive Component - Rewrite and additional work on Archive and Asset Bundler (#4332) 4 years ago
Module.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
ModuleTestBus.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
OrderedEventBenchmarks.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
OrderedEventTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Outcome.cpp remove unnecessary ALIGN macros 4 years ago
Patching.cpp More fixes 4 years ago
RemappableId.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Rtti.cpp more fixes for Code 4 years ago
Script.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
ScriptMath.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
ScriptProperty.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Serialization.cpp Cleanup SerializeContext.h pt.1 (#4264) 4 years ago
SerializeContextFixture.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Slice.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
State.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
StatisticalProfiler.cpp [development] Revived the statistical profiler (#4378) 4 years ago
Statistics.cpp Modernization + AZStd::function compare fix. (#3680) 4 years ago
StreamerTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
StringFunc.cpp Remove old "Integ" functionality from tests (#4688) 4 years ago
SystemFile.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
TaskTests.cpp convert atom to task graph (#4230) 4 years ago
TestCatalog.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
TestCatalog.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
TickBusTest.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
UUIDTests.cpp Squashed commit of Procedural Prefab work (#4481) 4 years ago
XML.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
azcoretestdll_files.cmake Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
azcoretests_files.cmake Support for importing Json files (#4609) 4 years ago
aztestshared_files.cmake Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago