Merge branch 'development' into cmake/warn_virtual

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-10 20:27:01 -07:00
156 changed files with 35196 additions and 34784 deletions
@@ -56,7 +56,7 @@ namespace UnitTest
}
// filesystem::path::is_absolute test
// PathView::IsAbsolute test
TEST_F(PathFixture, IsAbsolute_ReturnsTrue)
{
using fixed_max_path = AZ::IO::FixedMaxPath;
@@ -88,7 +88,7 @@ namespace UnitTest
static_assert(IsAbsolute());
}
// filesystem::path::is_relative test
// PathView::isRelative test
TEST_F(PathFixture, IsRelative_ReturnsTrue)
{
using fixed_max_path = AZ::IO::FixedMaxPath;
@@ -573,7 +573,16 @@ namespace UnitTest
PathLexicallyNormalParams{ '/', "foo/./bar/..", "foo" },
PathLexicallyNormalParams{ '/', "foo/.///bar/../", "foo" },
PathLexicallyNormalParams{ '/', R"(/foo\./bar\..\)", "/foo" },
PathLexicallyNormalParams{ '\\', R"(C:/O3DE/dev/Cache\game/../pc)", R"(C:\O3DE\dev\Cache\pc)" }
PathLexicallyNormalParams{ '/', R"(/..)", "/" },
PathLexicallyNormalParams{ '\\', R"(C:/O3DE/dev/Cache\game/../pc)", R"(C:\O3DE\dev\Cache\pc)" },
PathLexicallyNormalParams{ '\\', R"(C:/foo/C:bar)", R"(C:\foo\bar)" },
PathLexicallyNormalParams{ '\\', R"(C:foo/C:bar)", R"(C:foo\bar)" },
PathLexicallyNormalParams{ '\\', R"(C:/foo/C:/bar)", R"(C:\bar)" },
PathLexicallyNormalParams{ '\\', R"(C:/foo/C:)", R"(C:\foo)" },
PathLexicallyNormalParams{ '\\', R"(C:/foo/C:/)", R"(C:\)" },
PathLexicallyNormalParams{ '\\', R"(C:/foo/D:bar)", R"(D:bar)" },
PathLexicallyNormalParams{ '\\', R"(..)", R"(..)" },
PathLexicallyNormalParams{ '\\', R"(foo/../../bar)", R"(..\bar)" }
)
);
@@ -641,7 +650,12 @@ namespace UnitTest
PathViewLexicallyProximateParams{ '\\', "C:\\a\\b", "C:\\a\\d\\c", "..\\..\\b", false },
PathViewLexicallyProximateParams{ '\\', "C:a\\b", "C:\\a\\b", "C:a\\b", false },
PathViewLexicallyProximateParams{ '\\', "C:\\a\\b", "C:a\\b", "C:\\a\\b", false },
PathViewLexicallyProximateParams{ '\\', "E:\\a\\b", "F:\\a\\b", "E:\\a\\b", false }
PathViewLexicallyProximateParams{ '\\', "E:\\a\\b", "F:\\a\\b", "E:\\a\\b", false },
PathViewLexicallyProximateParams{ '\\', "D:/o3de/proJECT/cache/asset.txt", "d:\\o3de\\Project\\Cache", "asset.txt", true },
PathViewLexicallyProximateParams{ '\\', "D:/o3de/proJECT/cache/pc/..", "d:\\o3de\\Project\\Cache", "pc\\..", true },
PathViewLexicallyProximateParams{ '\\', "D:/o3de/proJECT/cache/pc/asset.txt/..", "d:\\o3de\\Project\\Cache\\", "pc\\asset.txt\\..", true },
PathViewLexicallyProximateParams{ '\\', "D:/o3de/proJECT/cache\\", "D:\\o3de\\Project\\Cache/", ".", true },
PathViewLexicallyProximateParams{ '\\', "D:/o3de/proJECT/cache/../foo", "D:\\o3de\\Project\\Cache", "..\\foo", false }
)
);
@@ -10,11 +10,12 @@
#include <AzCore/Settings/SettingsRegistryImpl.h>
#include <AzCore/Settings/SettingsRegistryScriptUtils.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzCore/std/containers/variant.h>
namespace SettingsRegistryScriptUtilsTests
{
static constexpr const char* SettingsRegistryScriptClassName = "SettingsRegistryInterface";
class SettingsRegistryBehaviorContextFixture
: public UnitTest::ScopedAllocatorSetupFixture
@@ -77,7 +78,7 @@ namespace SettingsRegistryScriptUtilsTests
// so the invoking the getter on global Settings Registry should succeed, but return nullptr
EXPECT_TRUE(globalSettingsRegistryGetter->InvokeResult(settingsRegistryObject));
EXPECT_EQ(nullptr, settingsRegistryObject.m_settingsRegistry);
// Register the Settings Registry stored on the fixture with the SettingsRegistry Interface<T>
AZ::SettingsRegistry::Register(m_registry.get());
EXPECT_TRUE(globalSettingsRegistryGetter->InvokeResult(settingsRegistryObject));
@@ -227,7 +228,7 @@ namespace SettingsRegistryScriptUtilsTests
R"( "intIndex": -55)" "\n"
R"( })" "\n"
R"(])";
// Populate the settings registry to match the expected json values
m_registry->Set("/TestObject/boolValue", false);
m_registry->Set("/TestObject/intValue", aznumeric_cast<AZ::s64>(17));
@@ -562,4 +563,4 @@ namespace SettingsRegistryScriptUtilsTests
SettingsRegistryBehaviorContextParams{ "/TestObject/stringValue", AZStd::string_view{"Hello World"}, "GetString", "SetString" }
)
);
}
}