Bläddra i källkod

Add unit test for verifying UUIDs are different between files

Signed-off-by: amzn-mike <[email protected]>
amzn-mike 2 år sedan
förälder
incheckning
4c84d6ab81
1 ändrade filer med 14 tillägg och 0 borttagningar
  1. 14 0
      Code/Tools/AssetProcessor/native/tests/UuidManagerTests.cpp

+ 14 - 0
Code/Tools/AssetProcessor/native/tests/UuidManagerTests.cpp

@@ -229,6 +229,20 @@ namespace UnitTests
         EXPECT_EQ(uuid, uuid2);
         EXPECT_EQ(uuid, uuid2);
     }
     }
 
 
+    TEST_F(UuidManagerTests, GetUuid_DifferentFiles_ReturnsDifferentUuid)
+    {
+        static constexpr const char* FileA = "c:/somepath/fileA.txt";
+        static constexpr const char* FileB = "c:/somepath/fileB.txt";
+
+        auto uuid = m_uuidInterface->GetUuid(AssetProcessor::SourceAssetReference(FileA));
+
+        EXPECT_FALSE(uuid.IsNull());
+
+        auto uuid2 = m_uuidInterface->GetUuid(AssetProcessor::SourceAssetReference(FileB));
+
+        EXPECT_NE(uuid, uuid2);
+    }
+
     TEST_F(UuidManagerTests, GetLegacyUuids_UppercaseFileName_ReturnsTwoDifferentUuids)
     TEST_F(UuidManagerTests, GetLegacyUuids_UppercaseFileName_ReturnsTwoDifferentUuids)
     {
     {
         auto uuids = m_uuidInterface->GetLegacyUuids(AssetProcessor::SourceAssetReference("c:/somepath/Mockfile.txt"));
         auto uuids = m_uuidInterface->GetLegacyUuids(AssetProcessor::SourceAssetReference("c:/somepath/Mockfile.txt"));