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

Unified Diff: test/cctest/test-debug.cc

Issue 93120: Changed the ASSERT's in the cctest's to CHECK's (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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-api.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698