Upgrade V8 to version 4.9.385.28
https://chromium.googlesource.com/v8/v8/+/4.9.385.28
FPIIM-449
Change-Id: I4b2e74289d4bf3667f2f3dc8aa2e541f63e26eb4
diff --git a/test/cctest/test-hashmap.cc b/test/cctest/test-hashmap.cc
index 1e94bed..b45d6c7 100644
--- a/test/cctest/test-hashmap.cc
+++ b/test/cctest/test-hashmap.cc
@@ -48,7 +48,8 @@
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 @@
}
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);
}
@@ -93,37 +93,37 @@
void TestSet(IntKeyHash hash, int size) {
IntSet set(hash);
- CHECK_EQ(0, set.occupancy());
+ CHECK_EQ(0u, set.occupancy());
set.Insert(1);
set.Insert(2);
set.Insert(3);
- CHECK_EQ(3, set.occupancy());
+ CHECK_EQ(3u, set.occupancy());
set.Insert(2);
set.Insert(3);
- CHECK_EQ(3, set.occupancy());
+ CHECK_EQ(3u, set.occupancy());
CHECK(set.Present(1));
CHECK(set.Present(2));
CHECK(set.Present(3));
CHECK(!set.Present(4));
- CHECK_EQ(3, set.occupancy());
+ CHECK_EQ(3u, set.occupancy());
set.Remove(1);
CHECK(!set.Present(1));
CHECK(set.Present(2));
CHECK(set.Present(3));
- CHECK_EQ(2, set.occupancy());
+ CHECK_EQ(2u, set.occupancy());
set.Remove(3);
CHECK(!set.Present(1));
CHECK(set.Present(2));
CHECK(!set.Present(3));
- CHECK_EQ(1, set.occupancy());
+ CHECK_EQ(1u, set.occupancy());
set.Clear();
- CHECK_EQ(0, set.occupancy());
+ CHECK_EQ(0u, set.occupancy());
// Insert a long series of values.
const int start = 453;
@@ -167,11 +167,11 @@
y = y * factor + offset;
}
}
- CHECK_EQ(0, set.occupancy());
+ CHECK_EQ(0u, set.occupancy());
}
-TEST(Set) {
+TEST(HashSet) {
TestSet(Hash, 100);
TestSet(CollisionHash, 50);
}