summaryrefslogtreecommitdiff
path: root/src/tests/common/cityhash.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-02-18 00:23:53 -0300
committerGravatar ReinUsesLisp2021-02-18 00:45:17 -0300
commitf3805376f726e10ff2fe26e99b8702f20eee3eea (patch)
treea8079d5a1026e3a408e6a72c4c32ac9f7ff852f6 /src/tests/common/cityhash.cpp
parenttests: Add tests for CityHash (diff)
downloadyuzu-f3805376f726e10ff2fe26e99b8702f20eee3eea.tar.gz
yuzu-f3805376f726e10ff2fe26e99b8702f20eee3eea.tar.xz
yuzu-f3805376f726e10ff2fe26e99b8702f20eee3eea.zip
common/cityhash: Use common types
Allow sharing return types with the rest of the code base. For example, we use 'u128 = std::array<u64, 2>', meanwhile Google's code uses 'uint128 = std::pair<u64, u64>'. While we are at it, use size_t instead of std::size_t.
Diffstat (limited to 'src/tests/common/cityhash.cpp')
-rw-r--r--src/tests/common/cityhash.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/common/cityhash.cpp b/src/tests/common/cityhash.cpp
index 172dd55b4..7a40b6c4a 100644
--- a/src/tests/common/cityhash.cpp
+++ b/src/tests/common/cityhash.cpp
@@ -16,7 +16,7 @@ TEST_CASE("CityHash", "[common]") {
16 REQUIRE(CityHash64(msg, sizeof(msg)) == 0x92d5c2e9cbfbbc01); 16 REQUIRE(CityHash64(msg, sizeof(msg)) == 0x92d5c2e9cbfbbc01);
17 REQUIRE(CityHash64WithSeed(msg, sizeof(msg), 0xdead) == 0xbfbe93f21a2820dd); 17 REQUIRE(CityHash64WithSeed(msg, sizeof(msg), 0xdead) == 0xbfbe93f21a2820dd);
18 REQUIRE(CityHash64WithSeeds(msg, sizeof(msg), 0xbeef, 0xcafe) == 0xb343317955fc8a06); 18 REQUIRE(CityHash64WithSeeds(msg, sizeof(msg), 0xbeef, 0xcafe) == 0xb343317955fc8a06);
19 REQUIRE(CityHash128(msg, sizeof(msg)) == uint128{0x98e60d0423747eaa, 0xd8694c5b6fcaede9}); 19 REQUIRE(CityHash128(msg, sizeof(msg)) == u128{0x98e60d0423747eaa, 0xd8694c5b6fcaede9});
20 REQUIRE(CityHash128WithSeed(msg, sizeof(msg), {0xdead, 0xbeef}) == 20 REQUIRE(CityHash128WithSeed(msg, sizeof(msg), {0xdead, 0xbeef}) ==
21 uint128{0xf0307dba81199ebe, 0xd77764e0c4a9eb74}); 21 u128{0xf0307dba81199ebe, 0xd77764e0c4a9eb74});
22} 22}