Merge branch 'development' into cmake/warn_virtual
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -608,6 +608,9 @@ namespace UnitTest
|
||||
archive->ClosePack(genericArchiveFileName);
|
||||
cpfio.Remove(genericArchiveFileName);
|
||||
|
||||
// create the asset alias directory
|
||||
cpfio.CreatePath("@assets@");
|
||||
|
||||
// create generic file
|
||||
|
||||
HandleType normalFileHandle;
|
||||
@@ -848,13 +851,17 @@ namespace UnitTest
|
||||
const char *assetsPath = ioBase->GetAlias("@assets@");
|
||||
ASSERT_NE(nullptr, assetsPath);
|
||||
|
||||
AZStd::string stringToAdd = AZStd::string::format("%s/textures/test.dds", assetsPath);
|
||||
auto stringToAdd = AZ::IO::Path(assetsPath) / "textures" / "test.dds";
|
||||
|
||||
reslist->Clear();
|
||||
reslist->Add(stringToAdd.c_str());
|
||||
reslist->Add(stringToAdd.Native());
|
||||
|
||||
// it normalizes the string, so the slashes flip and everything is lowercased.
|
||||
EXPECT_STREQ(reslist->GetFirst(), "@assets@/textures/test.dds");
|
||||
AZ::IO::FixedMaxPath resolvedAddedPath;
|
||||
AZ::IO::FixedMaxPath resolvedResourcePath;
|
||||
EXPECT_TRUE(ioBase->ReplaceAlias(resolvedAddedPath, "@assets@/textures/test.dds"));
|
||||
EXPECT_TRUE(ioBase->ReplaceAlias(resolvedResourcePath, reslist->GetFirst()));
|
||||
EXPECT_EQ(resolvedAddedPath, resolvedResourcePath);
|
||||
reslist->Clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user