Index: test/cctest/test-hashmap.cc |
diff --git a/test/cctest/test-hashmap.cc b/test/cctest/test-hashmap.cc |
index 68a7e8911bd48f6d1f2c57b4f8fddd8f1021cd0f..fb56225fb4432a7f0b17acc78e73290ba395b447 100644 |
--- a/test/cctest/test-hashmap.cc |
+++ b/test/cctest/test-hashmap.cc |
@@ -48,7 +48,8 @@ class IntSet { |
void Insert(int x) { |
CHECK_NE(0, x); // 0 corresponds to (void*)NULL - illegal key value |
- HashMap::Entry* p = map_.Lookup(reinterpret_cast<void*>(x), hash_(x), true); |
+ HashMap::Entry* p = |
+ map_.LookupOrInsert(reinterpret_cast<void*>(x), hash_(x)); |
CHECK(p != NULL); // insert is set! |
CHECK_EQ(reinterpret_cast<void*>(x), p->key); |
// we don't care about p->value |
@@ -60,8 +61,7 @@ class IntSet { |
} |
bool Present(int x) { |
- HashMap::Entry* p = |
- map_.Lookup(reinterpret_cast<void*>(x), hash_(x), false); |
+ HashMap::Entry* p = map_.Lookup(reinterpret_cast<void*>(x), hash_(x)); |
if (p != NULL) { |
CHECK_EQ(reinterpret_cast<void*>(x), p->key); |
} |