Index: test/cctest/test-debug.cc |
=================================================================== |
--- test/cctest/test-debug.cc (revision 1788) |
+++ test/cctest/test-debug.cc (working copy) |
@@ -232,7 +232,7 @@ |
v8::TryCatch try_catch; |
v8::Handle<v8::String> str = v8::String::New(buffer.start()); |
v8::Handle<v8::Value> value = v8::Script::Compile(str)->Run(); |
- ASSERT(!try_catch.HasCaught()); |
+ CHECK(!try_catch.HasCaught()); |
return value->Int32Value(); |
} |
} |
@@ -259,7 +259,7 @@ |
v8::TryCatch try_catch; |
v8::Handle<v8::String> str = v8::String::New(buffer.start()); |
v8::Handle<v8::Value> value = v8::Script::Compile(str)->Run(); |
- ASSERT(!try_catch.HasCaught()); |
+ CHECK(!try_catch.HasCaught()); |
return value->Int32Value(); |
} |
} |
@@ -2945,9 +2945,11 @@ |
v8::HandleScope scope; |
DebugLocalContext env; |
- // This test should be run with option --verify-heap. This is an ASSERT and |
- // not a CHECK as --verify-heap is only available in debug mode. |
- ASSERT(v8::internal::FLAG_verify_heap); |
+ // This test should be run with option --verify-heap. As --verify-heap is |
+ // only available in debug mode only check for it in that case. |
+#ifdef DEBUG |
+ CHECK(v8::internal::FLAG_verify_heap); |
+#endif |
// Register a debug event listener which sets the break flag and counts. |
v8::Debug::SetDebugEventListener(DebugEventBreak); |
@@ -3361,7 +3363,7 @@ |
void ThreadBarrier::Wait() { |
lock_->Lock(); |
- ASSERT(!invalid_); |
+ CHECK(!invalid_); |
if (num_blocked_ == num_threads_ - 1) { |
// Signal and unblock all waiting threads. |
for (int i = 0; i < num_threads_ - 1; ++i) { |
@@ -3566,9 +3568,9 @@ |
new TestClientData())); |
queue.Put(CommandMessage::New(Vector<uint16_t>::empty(), |
new TestClientData())); |
- ASSERT_EQ(0, TestClientData::destructor_call_counter); |
+ CHECK_EQ(0, TestClientData::destructor_call_counter); |
queue.Get().Dispose(); |
- ASSERT_EQ(1, TestClientData::destructor_call_counter); |
+ CHECK_EQ(1, TestClientData::destructor_call_counter); |
queue.Put(CommandMessage::New(Vector<uint16_t>::empty(), |
new TestClientData())); |
queue.Put(CommandMessage::New(Vector<uint16_t>::empty(), |
@@ -3579,13 +3581,13 @@ |
new TestClientData())); |
queue.Put(CommandMessage::New(Vector<uint16_t>::empty(), |
new TestClientData())); |
- ASSERT_EQ(1, TestClientData::destructor_call_counter); |
+ CHECK_EQ(1, TestClientData::destructor_call_counter); |
queue.Get().Dispose(); |
- ASSERT_EQ(2, TestClientData::destructor_call_counter); |
+ CHECK_EQ(2, TestClientData::destructor_call_counter); |
} |
// All the client data should be destroyed when the queue is destroyed. |
- ASSERT_EQ(TestClientData::destructor_call_counter, |
- TestClientData::destructor_call_counter); |
+ CHECK_EQ(TestClientData::destructor_call_counter, |
+ TestClientData::destructor_call_counter); |
} |
@@ -3635,11 +3637,11 @@ |
new TestClientData()); |
v8::Debug::SendCommand(buffer, AsciiToUtf16(command_continue, buffer)); |
CompileRun(source_1); |
- ASSERT_EQ(3, TestClientData::constructor_call_counter); |
- ASSERT_EQ(TestClientData::constructor_call_counter, |
- handled_client_data_instances_count); |
- ASSERT_EQ(TestClientData::constructor_call_counter, |
- TestClientData::destructor_call_counter); |
+ CHECK_EQ(3, TestClientData::constructor_call_counter); |
+ CHECK_EQ(TestClientData::constructor_call_counter, |
+ handled_client_data_instances_count); |
+ CHECK_EQ(TestClientData::constructor_call_counter, |
+ TestClientData::destructor_call_counter); |
} |