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

Unified Diff: tests/GrBinHashKeyTest.cpp

Issue 861323002: Remove GrBinHashKey (Closed) Base URL: https://skia.googlesource.com/skia.git@content
Patch Set: Created 5 years, 11 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
« no previous file with comments | « src/gpu/GrMurmur3HashKey.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GrBinHashKeyTest.cpp
diff --git a/tests/GrBinHashKeyTest.cpp b/tests/GrBinHashKeyTest.cpp
deleted file mode 100644
index 175719d3cd238d119d6306e356aedb2ea9361bd7..0000000000000000000000000000000000000000
--- a/tests/GrBinHashKeyTest.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-// This is a GPU-backend specific test
-#if SK_SUPPORT_GPU
-
-#include "GrMurmur3HashKey.h"
-#include "GrBinHashKey.h"
-
-#include "Test.h"
-
-struct AlignedKey {
- uint32_t align;
- char key[8];
-};
-
-template<typename KeyType> static void TestHash(skiatest::Reporter* reporter) {
- AlignedKey a, b;
- memcpy(&a.key, "abcdABCD", 8);
- memcpy(&b.key, "abcdBBCD", 8);
- const uint32_t* testStringA = reinterpret_cast<const uint32_t*>(&a.key);
- const uint32_t* testStringB = reinterpret_cast<const uint32_t*>(&b.key);
-
- KeyType keyA;
- keyA.setKeyData(testStringA);
- // test copy constructor and comparison
- KeyType keyA2(keyA);
- REPORTER_ASSERT(reporter, keyA == keyA2);
- REPORTER_ASSERT(reporter, keyA.getHash() == keyA2.getHash());
- // test re-init
- keyA2.setKeyData(testStringA);
- REPORTER_ASSERT(reporter, keyA == keyA2);
- REPORTER_ASSERT(reporter, keyA.getHash() == keyA2.getHash());
- // test sorting
- KeyType keyB;
- keyB.setKeyData(testStringB);
- REPORTER_ASSERT(reporter, keyA.getHash() != keyB.getHash());
-}
-
-
-DEF_TEST(GrBinHashKey, reporter) {
- enum {
- kDataLenUsedForKey = 8
- };
-
- TestHash<GrBinHashKey<kDataLenUsedForKey> >(reporter);
- TestHash<GrMurmur3HashKey<kDataLenUsedForKey> >(reporter);
-}
-
-#endif
« no previous file with comments | « src/gpu/GrMurmur3HashKey.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698