Index: test/cctest/test-global-handles.cc |
diff --git a/test/cctest/test-global-handles.cc b/test/cctest/test-global-handles.cc |
index 0a9a3f2a744d54a271b35bdd06dec155163ff09b..ee295d6991cce0db19cdfebb090aba1aea99ba73 100644 |
--- a/test/cctest/test-global-handles.cc |
+++ b/test/cctest/test-global-handles.cc |
@@ -56,7 +56,7 @@ class TestRetainedObjectInfo : public v8::RetainedObjectInfo { |
bool has_been_disposed() { return has_been_disposed_; } |
virtual void Dispose() { |
- ASSERT(!has_been_disposed_); |
+ DCHECK(!has_been_disposed_); |
has_been_disposed_ = true; |
} |
@@ -121,16 +121,16 @@ TEST(IterateObjectGroupsOldApi) { |
global_handles->IterateObjectGroups(&visitor, &CanSkipCallback); |
// CanSkipCallback was called for all objects. |
- ASSERT(can_skip_called_objects.length() == 4); |
- ASSERT(can_skip_called_objects.Contains(*g1s1.location())); |
- ASSERT(can_skip_called_objects.Contains(*g1s2.location())); |
- ASSERT(can_skip_called_objects.Contains(*g2s1.location())); |
- ASSERT(can_skip_called_objects.Contains(*g2s2.location())); |
+ DCHECK(can_skip_called_objects.length() == 4); |
+ DCHECK(can_skip_called_objects.Contains(*g1s1.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g1s2.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g2s1.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g2s2.location())); |
// Nothing was visited. |
- ASSERT(visitor.visited.length() == 0); |
- ASSERT(!info1.has_been_disposed()); |
- ASSERT(!info2.has_been_disposed()); |
+ DCHECK(visitor.visited.length() == 0); |
+ DCHECK(!info1.has_been_disposed()); |
+ DCHECK(!info2.has_been_disposed()); |
} |
// Iterate again, now only skip the second object group. |
@@ -145,18 +145,18 @@ TEST(IterateObjectGroupsOldApi) { |
global_handles->IterateObjectGroups(&visitor, &CanSkipCallback); |
// CanSkipCallback was called for all objects. |
- ASSERT(can_skip_called_objects.length() == 3 || |
+ DCHECK(can_skip_called_objects.length() == 3 || |
can_skip_called_objects.length() == 4); |
- ASSERT(can_skip_called_objects.Contains(*g1s2.location())); |
- ASSERT(can_skip_called_objects.Contains(*g2s1.location())); |
- ASSERT(can_skip_called_objects.Contains(*g2s2.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g1s2.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g2s1.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g2s2.location())); |
// The first group was visited. |
- ASSERT(visitor.visited.length() == 2); |
- ASSERT(visitor.visited.Contains(*g1s1.location())); |
- ASSERT(visitor.visited.Contains(*g1s2.location())); |
- ASSERT(info1.has_been_disposed()); |
- ASSERT(!info2.has_been_disposed()); |
+ DCHECK(visitor.visited.length() == 2); |
+ DCHECK(visitor.visited.Contains(*g1s1.location())); |
+ DCHECK(visitor.visited.Contains(*g1s2.location())); |
+ DCHECK(info1.has_been_disposed()); |
+ DCHECK(!info2.has_been_disposed()); |
} |
// Iterate again, don't skip anything. |
@@ -166,15 +166,15 @@ TEST(IterateObjectGroupsOldApi) { |
global_handles->IterateObjectGroups(&visitor, &CanSkipCallback); |
// CanSkipCallback was called for all objects. |
- ASSERT(can_skip_called_objects.length() == 1); |
- ASSERT(can_skip_called_objects.Contains(*g2s1.location()) || |
+ DCHECK(can_skip_called_objects.length() == 1); |
+ DCHECK(can_skip_called_objects.Contains(*g2s1.location()) || |
can_skip_called_objects.Contains(*g2s2.location())); |
// The second group was visited. |
- ASSERT(visitor.visited.length() == 2); |
- ASSERT(visitor.visited.Contains(*g2s1.location())); |
- ASSERT(visitor.visited.Contains(*g2s2.location())); |
- ASSERT(info2.has_been_disposed()); |
+ DCHECK(visitor.visited.length() == 2); |
+ DCHECK(visitor.visited.Contains(*g2s1.location())); |
+ DCHECK(visitor.visited.Contains(*g2s2.location())); |
+ DCHECK(info2.has_been_disposed()); |
} |
} |
@@ -216,16 +216,16 @@ TEST(IterateObjectGroups) { |
global_handles->IterateObjectGroups(&visitor, &CanSkipCallback); |
// CanSkipCallback was called for all objects. |
- ASSERT(can_skip_called_objects.length() == 4); |
- ASSERT(can_skip_called_objects.Contains(*g1s1.location())); |
- ASSERT(can_skip_called_objects.Contains(*g1s2.location())); |
- ASSERT(can_skip_called_objects.Contains(*g2s1.location())); |
- ASSERT(can_skip_called_objects.Contains(*g2s2.location())); |
+ DCHECK(can_skip_called_objects.length() == 4); |
+ DCHECK(can_skip_called_objects.Contains(*g1s1.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g1s2.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g2s1.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g2s2.location())); |
// Nothing was visited. |
- ASSERT(visitor.visited.length() == 0); |
- ASSERT(!info1.has_been_disposed()); |
- ASSERT(!info2.has_been_disposed()); |
+ DCHECK(visitor.visited.length() == 0); |
+ DCHECK(!info1.has_been_disposed()); |
+ DCHECK(!info2.has_been_disposed()); |
} |
// Iterate again, now only skip the second object group. |
@@ -240,18 +240,18 @@ TEST(IterateObjectGroups) { |
global_handles->IterateObjectGroups(&visitor, &CanSkipCallback); |
// CanSkipCallback was called for all objects. |
- ASSERT(can_skip_called_objects.length() == 3 || |
+ DCHECK(can_skip_called_objects.length() == 3 || |
can_skip_called_objects.length() == 4); |
- ASSERT(can_skip_called_objects.Contains(*g1s2.location())); |
- ASSERT(can_skip_called_objects.Contains(*g2s1.location())); |
- ASSERT(can_skip_called_objects.Contains(*g2s2.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g1s2.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g2s1.location())); |
+ DCHECK(can_skip_called_objects.Contains(*g2s2.location())); |
// The first group was visited. |
- ASSERT(visitor.visited.length() == 2); |
- ASSERT(visitor.visited.Contains(*g1s1.location())); |
- ASSERT(visitor.visited.Contains(*g1s2.location())); |
- ASSERT(info1.has_been_disposed()); |
- ASSERT(!info2.has_been_disposed()); |
+ DCHECK(visitor.visited.length() == 2); |
+ DCHECK(visitor.visited.Contains(*g1s1.location())); |
+ DCHECK(visitor.visited.Contains(*g1s2.location())); |
+ DCHECK(info1.has_been_disposed()); |
+ DCHECK(!info2.has_been_disposed()); |
} |
// Iterate again, don't skip anything. |
@@ -261,15 +261,15 @@ TEST(IterateObjectGroups) { |
global_handles->IterateObjectGroups(&visitor, &CanSkipCallback); |
// CanSkipCallback was called for all objects. |
- ASSERT(can_skip_called_objects.length() == 1); |
- ASSERT(can_skip_called_objects.Contains(*g2s1.location()) || |
+ DCHECK(can_skip_called_objects.length() == 1); |
+ DCHECK(can_skip_called_objects.Contains(*g2s1.location()) || |
can_skip_called_objects.Contains(*g2s2.location())); |
// The second group was visited. |
- ASSERT(visitor.visited.length() == 2); |
- ASSERT(visitor.visited.Contains(*g2s1.location())); |
- ASSERT(visitor.visited.Contains(*g2s2.location())); |
- ASSERT(info2.has_been_disposed()); |
+ DCHECK(visitor.visited.length() == 2); |
+ DCHECK(visitor.visited.Contains(*g2s1.location())); |
+ DCHECK(visitor.visited.Contains(*g2s2.location())); |
+ DCHECK(info2.has_been_disposed()); |
} |
} |
@@ -306,16 +306,16 @@ TEST(ImplicitReferences) { |
List<ImplicitRefGroup*>* implicit_refs = |
global_handles->implicit_ref_groups(); |
USE(implicit_refs); |
- ASSERT(implicit_refs->length() == 2); |
- ASSERT(implicit_refs->at(0)->parent == |
+ DCHECK(implicit_refs->length() == 2); |
+ DCHECK(implicit_refs->at(0)->parent == |
reinterpret_cast<HeapObject**>(g1s1.location())); |
- ASSERT(implicit_refs->at(0)->length == 2); |
- ASSERT(implicit_refs->at(0)->children[0] == g1c1.location()); |
- ASSERT(implicit_refs->at(0)->children[1] == g1c2.location()); |
- ASSERT(implicit_refs->at(1)->parent == |
+ DCHECK(implicit_refs->at(0)->length == 2); |
+ DCHECK(implicit_refs->at(0)->children[0] == g1c1.location()); |
+ DCHECK(implicit_refs->at(0)->children[1] == g1c2.location()); |
+ DCHECK(implicit_refs->at(1)->parent == |
reinterpret_cast<HeapObject**>(g2s1.location())); |
- ASSERT(implicit_refs->at(1)->length == 1); |
- ASSERT(implicit_refs->at(1)->children[0] == g2c1.location()); |
+ DCHECK(implicit_refs->at(1)->length == 1); |
+ DCHECK(implicit_refs->at(1)->children[0] == g2c1.location()); |
global_handles->RemoveObjectGroups(); |
global_handles->RemoveImplicitRefGroups(); |
} |