Index: test/cctest/test-ordered-hash-table.cc |
diff --git a/test/cctest/test-ordered-hash-table.cc b/test/cctest/test-ordered-hash-table.cc |
index bb1e0145b5335946c095773b22f45cb20720e3c5..957893631759af3dd0329e029229bd6ead7e6dda 100644 |
--- a/test/cctest/test-ordered-hash-table.cc |
+++ b/test/cctest/test-ordered-hash-table.cc |
@@ -118,7 +118,8 @@ TEST(Map) { |
CHECK(ordered_map->Lookup(obj)->IsTheHole()); |
ordered_map = OrderedHashMap::Put(ordered_map, obj, val); |
CHECK_EQ(1, ordered_map->NumberOfElements()); |
- CHECK(ordered_map->Lookup(obj)->SameValue(*val)); |
+ Object* lookup = ordered_map->Lookup(obj); |
+ CHECK(lookup->SameValue(*val)); |
bool was_present = false; |
ordered_map = OrderedHashMap::Remove(ordered_map, obj, &was_present); |
CHECK(was_present); |
@@ -136,20 +137,28 @@ TEST(Map) { |
ordered_map = OrderedHashMap::Put(ordered_map, obj2, val2); |
ordered_map = OrderedHashMap::Put(ordered_map, obj3, val3); |
CHECK_EQ(3, ordered_map->NumberOfElements()); |
- CHECK(ordered_map->Lookup(obj1)->SameValue(*val1)); |
- CHECK(ordered_map->Lookup(obj2)->SameValue(*val2)); |
- CHECK(ordered_map->Lookup(obj3)->SameValue(*val3)); |
+ lookup = ordered_map->Lookup(obj1); |
+ CHECK(lookup->SameValue(*val1)); |
+ lookup = ordered_map->Lookup(obj2); |
+ CHECK(lookup->SameValue(*val2)); |
+ lookup = ordered_map->Lookup(obj3); |
+ CHECK(lookup->SameValue(*val3)); |
// Test growth |
ordered_map = OrderedHashMap::Put(ordered_map, obj, val); |
Handle<JSObject> obj4 = factory->NewJSObjectFromMap(map); |
Handle<JSObject> val4 = factory->NewJSObjectFromMap(map); |
ordered_map = OrderedHashMap::Put(ordered_map, obj4, val4); |
- CHECK(ordered_map->Lookup(obj)->SameValue(*val)); |
- CHECK(ordered_map->Lookup(obj1)->SameValue(*val1)); |
- CHECK(ordered_map->Lookup(obj2)->SameValue(*val2)); |
- CHECK(ordered_map->Lookup(obj3)->SameValue(*val3)); |
- CHECK(ordered_map->Lookup(obj4)->SameValue(*val4)); |
+ lookup = ordered_map->Lookup(obj); |
+ CHECK(lookup->SameValue(*val)); |
+ lookup = ordered_map->Lookup(obj1); |
+ CHECK(lookup->SameValue(*val1)); |
+ lookup = ordered_map->Lookup(obj2); |
+ CHECK(lookup->SameValue(*val2)); |
+ lookup = ordered_map->Lookup(obj3); |
+ CHECK(lookup->SameValue(*val3)); |
+ lookup = ordered_map->Lookup(obj4); |
+ CHECK(lookup->SameValue(*val4)); |
CHECK_EQ(5, ordered_map->NumberOfElements()); |
CHECK_EQ(4, ordered_map->NumberOfBuckets()); |