Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1053)

Unified Diff: tests/ChecksumTest.cpp

Issue 15027013: Remove third-party cityhash, unused since r8992 (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« DEPS ('K') | « src/utils/cityhash/config.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ChecksumTest.cpp
===================================================================
--- tests/ChecksumTest.cpp (revision 9056)
+++ tests/ChecksumTest.cpp (working copy)
@@ -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 @@
}
private:
enum Algorithm {
- kSkChecksum,
- kSkCityHash32,
- kSkCityHash64
+ kSkChecksum
};
// Call Compute(data, size) on the appropriate checksum algorithm,
@@ -41,10 +38,6 @@
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 @@
// 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.
« DEPS ('K') | « src/utils/cityhash/config.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698