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>
5 years ago
..
AZStd Changes GTEST_OS_SUPPORTS_DEATH_TEST to the right define which is GTEST_HAS_DEATH_TEST 5 years ago
AZTestShared
Asset Remove old "Integ" functionality from tests (#4688) 5 years ago
Console Fixes debug console autocomplete issues (#4223) 5 years ago
Debug Remove old "Integ" functionality from tests (#4688) 5 years ago
EBus
IO Update the FileIO Aliases (#4186) 5 years ago
Math
Memory Changes GTEST_OS_SUPPORTS_DEATH_TEST to the right define which is GTEST_HAS_DEATH_TEST 5 years ago
Name
Platform Remove old "Integ" functionality from tests (#4688) 5 years ago
RTTI
Serialization/Json Support for importing Json files (#4609) 5 years ago
Settings Added anchor key parameter to the SettingsRegistry MergeSettings (#4650) 5 years ago
Streamer
Time Some shutdown crash fixes, reverted a whitespace, and added some basic unit tests for time additions 5 years ago
AssetJsonSerializerTests.cpp {lyn7283} added test for assetHint Json Serialzier callback logic (#4586) 5 years ago
AssetManager.cpp
AssetSerializerTests.cpp
AzEnumTest.cpp
BehaviorContext.cpp
BehaviorContextFixture.h
Components.cpp
DLL.cpp
DLLMainTest.cpp
Debug.cpp
EBus.cpp Added a ThreadDispatch Policy to the EBus code (#4405) 5 years ago
EntityIdTests.cpp
EntityTests.cpp
EnumTests.cpp
EventTests.cpp
FileIOBaseTestTypes.h Update the FileIO Aliases (#4186) 5 years ago
FixedWidthIntegers.cpp
GenericStreamMock.h
GenericStreamTests.cpp
Geometry2DUtils.cpp
IPC.cpp
Interface.cpp
IntersectPoint.cpp
JSON.cpp
Jobs.cpp
Main.cpp
Memory.cpp Archive Component - Rewrite and additional work on Archive and Asset Bundler (#4332) 5 years ago
Module.cpp
ModuleTestBus.h
OrderedEventBenchmarks.cpp
OrderedEventTests.cpp
Outcome.cpp
Patching.cpp
RemappableId.cpp
Rtti.cpp
Script.cpp
ScriptMath.cpp
ScriptProperty.cpp
Serialization.cpp
SerializeContextFixture.h
Slice.cpp
State.cpp
StatisticalProfiler.cpp [development] Revived the statistical profiler (#4378) 5 years ago
Statistics.cpp
StreamerTests.cpp
StringFunc.cpp Remove old "Integ" functionality from tests (#4688) 5 years ago
SystemFile.cpp
TaskTests.cpp
TestCatalog.cpp
TestCatalog.h
TickBusTest.cpp
UUIDTests.cpp Squashed commit of Procedural Prefab work (#4481) 5 years ago
XML.cpp
azcoretestdll_files.cmake
azcoretests_files.cmake Support for importing Json files (#4609) 5 years ago
aztestshared_files.cmake