| Index: ipc/ipc_tests.cc
|
| ===================================================================
|
| --- ipc/ipc_tests.cc (revision 28954)
|
| +++ ipc/ipc_tests.cc (working copy)
|
| @@ -61,6 +61,30 @@
|
| MultiProcessTest::TearDown();
|
| }
|
|
|
| +#define PRINT_FOR_SURE(a) LOG(INFO) << a; printf("%s\n", a); fprintf(stderr, "%s\n", a);
|
| +bool return_true() {
|
| + PRINT_FOR_SURE("return_true was called");
|
| + return true;
|
| +}
|
| +
|
| +TEST_F(IPCChannelTest, DCHECK_TEST) {
|
| +#ifdef NDEBUG
|
| + PRINT_FOR_SURE("NDEBUG is defined");
|
| +#else
|
| + PRINT_FOR_SURE("NDEBUG is not defined");
|
| +#endif
|
| + DCHECK(return_true());
|
| +}
|
| +
|
| +void DeathFunction() {
|
| + DCHECK(!return_true());
|
| +}
|
| +
|
| +TEST_F(IPCChannelTest, DeathTest) {
|
| + //::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
| + ASSERT_DEATH_IF_SUPPORTED(DeathFunction(), "");
|
| +}
|
| +
|
| #if defined(OS_WIN)
|
| base::ProcessHandle IPCChannelTest::SpawnChild(ChildType child_type,
|
| IPC::Channel *channel) {
|
|
|