| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "Test.h" | 9 #include "Test.h" |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 uint32_t getHash() const { return fKey; } | 40 uint32_t getHash() const { return fKey; } |
| 41 | 41 |
| 42 static bool LT(const HashElement& entry, const HashKey& key) { | 42 static bool LT(const HashElement& entry, const HashKey& key) { |
| 43 return entry.fKey < key.fKey; | 43 return entry.fKey < key.fKey; |
| 44 } | 44 } |
| 45 static bool EQ(const HashElement& entry, const HashKey& key) { | 45 static bool EQ(const HashElement& entry, const HashKey& key) { |
| 46 return entry.fKey == key.fKey; | 46 return entry.fKey == key.fKey; |
| 47 } | 47 } |
| 48 | 48 |
| 49 #if GR_DEBUG | 49 #if SK_DEBUG |
| 50 static uint32_t GetHash(const HashElement& entry) { | 50 static uint32_t GetHash(const HashElement& entry) { |
| 51 return entry.fKey; | 51 return entry.fKey; |
| 52 } | 52 } |
| 53 static bool LT(const HashElement& a, const HashElement& b) { | 53 static bool LT(const HashElement& a, const HashElement& b) { |
| 54 return a.fKey < b.fKey; | 54 return a.fKey < b.fKey; |
| 55 } | 55 } |
| 56 static bool EQ(const HashElement& a, const HashElement& b) { | 56 static bool EQ(const HashElement& a, const HashElement& b) { |
| 57 return a.fKey == b.fKey; | 57 return a.fKey == b.fKey; |
| 58 } | 58 } |
| 59 #endif | 59 #endif |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 cache.removeAll(); | 161 cache.removeAll(); |
| 162 REPORTER_ASSERT(reporter, 0 == cache.count()); | 162 REPORTER_ASSERT(reporter, 0 == cache.count()); |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 | 165 |
| 166 //////////////////////////////////////////////////////////////////////////////// | 166 //////////////////////////////////////////////////////////////////////////////// |
| 167 #include "TestClassDef.h" | 167 #include "TestClassDef.h" |
| 168 DEFINE_TESTCLASS("HashCache", HashCacheTestClass, TestHashCache) | 168 DEFINE_TESTCLASS("HashCache", HashCacheTestClass, TestHashCache) |
| 169 | 169 |
| 170 #endif | 170 #endif |
| OLD | NEW |