diff options
author | 2013-05-08 14:49:50 +0000 | |
---|---|---|
committer | 2013-05-08 14:49:50 +0000 | |
commit | aaf7343e16c4bf9f9c6f07968689669fe6ba71d7 (patch) | |
tree | b1de9d98fbedfe025db75eeab526f31eb6a680c6 /tests | |
parent | 0a01f5a2c44f3d6a7fa2d3c837f46894d9b29e5d (diff) |
Remove third-party cityhash, unused since r8992
R=djsollen@google.com
Review URL: https://codereview.chromium.org/15027013
git-svn-id: http://skia.googlecode.com/svn/trunk@9059 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChecksumTest.cpp | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/tests/ChecksumTest.cpp b/tests/ChecksumTest.cpp index 81e7ef396c..ee33d32acd 100644 --- a/tests/ChecksumTest.cpp +++ b/tests/ChecksumTest.cpp @@ -8,7 +8,6 @@ #include "Test.h" #include "SkChecksum.h" -#include "SkCityHash.h" // Word size that is large enough to hold results of any checksum type. typedef uint64_t checksum_result; @@ -25,9 +24,7 @@ namespace skiatest { } private: enum Algorithm { - kSkChecksum, - kSkCityHash32, - kSkCityHash64 + kSkChecksum }; // Call Compute(data, size) on the appropriate checksum algorithm, @@ -41,10 +38,6 @@ namespace skiatest { REPORTER_ASSERT_MESSAGE(fReporter, SkIsAlign4(size), "test data size is not 32-bit aligned"); return SkChecksum::Compute(reinterpret_cast<const uint32_t *>(data), size); - case kSkCityHash32: - return SkCityHash::Compute32(data, size); - case kSkCityHash64: - return SkCityHash::Compute64(data, size); default: SkString message("fWhichAlgorithm has unknown value "); message.appendf("%d", fWhichAlgorithm); @@ -108,31 +101,11 @@ namespace skiatest { // Test self-consistency of checksum algorithms. fWhichAlgorithm = kSkChecksum; TestChecksumSelfConsistency(128); - fWhichAlgorithm = kSkCityHash32; - TestChecksumSelfConsistency(128); - fWhichAlgorithm = kSkCityHash64; - TestChecksumSelfConsistency(128); // Test checksum results that should be consistent across // versions and platforms. fWhichAlgorithm = kSkChecksum; REPORTER_ASSERT(fReporter, ComputeChecksum(NULL, 0) == 0); - fWhichAlgorithm = kSkCityHash32; - REPORTER_ASSERT(fReporter, ComputeChecksum(NULL, 0) == 0xdc56d17a); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(4) == 0x616e1132); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(8) == 0xeb0fd2d6); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(128) == 0x5321e430); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(132) == 0x924a10e4); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(256) == 0xd4de9dc9); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(260) == 0xecf0325d); - fWhichAlgorithm = kSkCityHash64; - REPORTER_ASSERT(fReporter, ComputeChecksum(NULL, 0) == 0x9ae16a3b2f90404fULL); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(4) == 0x82bffd898958e540ULL); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(8) == 0xad5a13e1e8e93b98ULL); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(128) == 0x10b153630af1f395ULL); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(132) == 0x7db71dc4adcc6647ULL); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(256) == 0xeee763519b91b010ULL); - REPORTER_ASSERT(fReporter, GetTestDataChecksum(260) == 0x2fe19e0b2239bc23ULL); // TODO: note the weakness exposed by these collisions... // We need to improve the SkChecksum algorithm. |