diff --git a/Gems/Atom/RHI/Code/Tests/UtilsTests.cpp b/Gems/Atom/RHI/Code/Tests/UtilsTests.cpp index 3bc5d568f3..506edc0d1e 100644 --- a/Gems/Atom/RHI/Code/Tests/UtilsTests.cpp +++ b/Gems/Atom/RHI/Code/Tests/UtilsTests.cpp @@ -42,7 +42,9 @@ namespace UnitTest AZStd::string testFilePath = TestDataFolder + AZStd::string("HelloWorld.txt"); AZ::Outcome outcome = AZ::RHI::LoadFileString(testFilePath.c_str()); EXPECT_TRUE(outcome.IsSuccess()); - EXPECT_EQ(AZStd::string("Hello World!"), outcome.GetValue()); + auto& str = outcome.GetValue(); + str.erase(AZStd::remove(str.begin(), str.end(), '\r')); + EXPECT_EQ(AZStd::string("Hello World!\n"), str); } TEST_F(UtilsTests, LoadFileBytes) @@ -50,8 +52,10 @@ namespace UnitTest AZStd::string testFilePath = TestDataFolder + AZStd::string("HelloWorld.txt"); AZ::Outcome, AZStd::string> outcome = AZ::RHI::LoadFileBytes(testFilePath.c_str()); EXPECT_TRUE(outcome.IsSuccess()); - AZStd::string expectedText = "Hello World!"; - EXPECT_EQ(AZStd::vector(expectedText.begin(), expectedText.end()), outcome.GetValue()); + AZStd::string expectedText = "Hello World!\n"; + auto& str = outcome.GetValue(); + str.erase(AZStd::remove(str.begin(), str.end(), '\r')); + EXPECT_EQ(AZStd::vector(expectedText.begin(), expectedText.end()), str); } TEST_F(UtilsTests, LoadFileString_Error_DoesNotExist)