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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 // remove the 0:0 entries | 149 // remove the 0:0 entries |
150 { | 150 { |
151 cache.remove(0, &negHashElements[0]); | 151 cache.remove(0, &negHashElements[0]); |
152 cache.remove(0, &posHashElements[0]); | 152 cache.remove(0, &posHashElements[0]); |
153 REPORTER_ASSERT(reporter, 18 == cache.count()); | 153 REPORTER_ASSERT(reporter, 18 == cache.count()); |
154 | 154 |
155 HashElement* found = cache.find(0); | 155 HashElement* found = cache.find(0); |
156 REPORTER_ASSERT(reporter, NULL == found); | 156 REPORTER_ASSERT(reporter, NULL == found); |
157 } | 157 } |
158 | |
159 // remove all | |
160 { | |
161 cache.removeAll(); | |
162 REPORTER_ASSERT(reporter, 0 == cache.count()); | |
163 } | |
164 } | 158 } |
165 | 159 |
166 //////////////////////////////////////////////////////////////////////////////// | 160 //////////////////////////////////////////////////////////////////////////////// |
167 #include "TestClassDef.h" | 161 #include "TestClassDef.h" |
168 DEFINE_TESTCLASS("HashCache", HashCacheTestClass, TestHashCache) | 162 DEFINE_TESTCLASS("HashCache", HashCacheTestClass, TestHashCache) |
169 | 163 |
170 #endif | 164 #endif |
OLD | NEW |