Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: test/cctest/test-ordered-hash-table.cc

Issue 490423003: Pacify GCmole. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698