diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2022-04-04 05:51:50 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2022-04-04 05:51:50 -0700 |
commit | bcb95726067e422d4d55ab078c4b898915a91a45 (patch) | |
tree | dd8ded958bfdfda4007b7325353f5d10a45b00da /services/surfaceflinger/tests/unittests/DisplayIdentificationTest.cpp | |
parent | 310298e2816e5393a85ea10a7661416376cf505d (diff) | |
parent | c3e6bd2fb2223973f26325d11c28b32b8685cfbd (diff) |
Merge c3e6bd2fb2223973f26325d11c28b32b8685cfbd on remote branch
Change-Id: Ic5966863c7610787847f8f7fc4f939af5f87f13e
Diffstat (limited to 'services/surfaceflinger/tests/unittests/DisplayIdentificationTest.cpp')
-rw-r--r-- | services/surfaceflinger/tests/unittests/DisplayIdentificationTest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/services/surfaceflinger/tests/unittests/DisplayIdentificationTest.cpp b/services/surfaceflinger/tests/unittests/DisplayIdentificationTest.cpp index dc04b6d91d..cd4a5c961d 100644 --- a/services/surfaceflinger/tests/unittests/DisplayIdentificationTest.cpp +++ b/services/surfaceflinger/tests/unittests/DisplayIdentificationTest.cpp @@ -25,6 +25,7 @@ #include <gtest/gtest.h> #include "DisplayHardware/DisplayIdentification.h" +#include "DisplayHardware/Hash.h" using ::testing::ElementsAre; @@ -134,7 +135,7 @@ DisplayIdentificationData asDisplayIdentificationData(const unsigned char (&byte } uint32_t hash(const char* str) { - return static_cast<uint32_t>(std::hash<std::string_view>()(str)); + return static_cast<uint32_t>(cityHash64Len0To16(str)); } } // namespace @@ -309,9 +310,9 @@ TEST(DisplayIdentificationTest, parseDisplayIdentificationData) { ASSERT_TRUE(tertiaryInfo); // Display IDs should be unique. - EXPECT_NE(primaryInfo->id, secondaryInfo->id); - EXPECT_NE(primaryInfo->id, tertiaryInfo->id); - EXPECT_NE(secondaryInfo->id, tertiaryInfo->id); + EXPECT_EQ(4633257497453176576, primaryInfo->id.value); + EXPECT_EQ(4621520285560261121, secondaryInfo->id.value); + EXPECT_EQ(4633127902230889474, tertiaryInfo->id.value); } TEST(DisplayIdentificationTest, deviceProductInfo) { |