Index: test/cctest/test-dictionary.cc |
diff --git a/test/cctest/test-dictionary.cc b/test/cctest/test-dictionary.cc |
index d7344a142fdb98200ee7d6e5645cb711d5d4a60e..92bf65760e1bbdc84d27116a2902cf77aee0e398 100644 |
--- a/test/cctest/test-dictionary.cc |
+++ b/test/cctest/test-dictionary.cc |
@@ -50,27 +50,27 @@ static void TestHashMap(Handle<HashMap> table) { |
Handle<JSObject> a = factory->NewJSArray(7); |
Handle<JSObject> b = factory->NewJSArray(11); |
table = HashMap::Put(table, a, b); |
- CHECK_EQ(table->NumberOfElements(), 1); |
+ CHECK_EQ(1, table->NumberOfElements()); |
CHECK_EQ(table->Lookup(a), *b); |
// When the key does not exist in the map, Lookup returns the hole. |
CHECK_EQ(table->Lookup(b), CcTest::heap()->the_hole_value()); |
// Keys still have to be valid after objects were moved. |
CcTest::CollectGarbage(NEW_SPACE); |
- CHECK_EQ(table->NumberOfElements(), 1); |
+ CHECK_EQ(1, table->NumberOfElements()); |
CHECK_EQ(table->Lookup(a), *b); |
CHECK_EQ(table->Lookup(b), CcTest::heap()->the_hole_value()); |
// Keys that are overwritten should not change number of elements. |
table = HashMap::Put(table, a, factory->NewJSArray(13)); |
- CHECK_EQ(table->NumberOfElements(), 1); |
+ CHECK_EQ(1, table->NumberOfElements()); |
CHECK_NE(table->Lookup(a), *b); |
// Keys that have been removed are mapped to the hole. |
bool was_present = false; |
table = HashMap::Remove(table, a, &was_present); |
CHECK(was_present); |
- CHECK_EQ(table->NumberOfElements(), 0); |
+ CHECK_EQ(0, table->NumberOfElements()); |
CHECK_EQ(table->Lookup(a), CcTest::heap()->the_hole_value()); |
// Keys should map back to their respective values and also should get |
@@ -121,19 +121,19 @@ static void TestHashSet(Handle<HashSet> table) { |
Handle<JSObject> a = factory->NewJSArray(7); |
Handle<JSObject> b = factory->NewJSArray(11); |
table = HashSet::Add(table, a); |
- CHECK_EQ(table->NumberOfElements(), 1); |
+ CHECK_EQ(1, table->NumberOfElements()); |
CHECK(table->Has(isolate, a)); |
CHECK(!table->Has(isolate, b)); |
// Keys still have to be valid after objects were moved. |
CcTest::CollectGarbage(NEW_SPACE); |
- CHECK_EQ(table->NumberOfElements(), 1); |
+ CHECK_EQ(1, table->NumberOfElements()); |
CHECK(table->Has(isolate, a)); |
CHECK(!table->Has(isolate, b)); |
// Keys that are overwritten should not change number of elements. |
table = HashSet::Add(table, a); |
- CHECK_EQ(table->NumberOfElements(), 1); |
+ CHECK_EQ(1, table->NumberOfElements()); |
CHECK(table->Has(isolate, a)); |
CHECK(!table->Has(isolate, b)); |
@@ -142,7 +142,7 @@ static void TestHashSet(Handle<HashSet> table) { |
// bool was_present = false; |
// table = HashSet::Remove(table, a, &was_present); |
// CHECK(was_present); |
- // CHECK_EQ(table->NumberOfElements(), 0); |
+ // CHECK_EQ(0, table->NumberOfElements()); |
// CHECK(!table->Has(a)); |
// CHECK(!table->Has(b)); |