| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/dynamic_annotations.h" | 5 #include "base/dynamic_annotations.h" |
| 6 #include "base/lock.h" | 6 #include "base/lock.h" |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/thread.h" | 9 #include "base/thread.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 EXPECT_EQ("ThreadName", a.thread_name()); | 134 EXPECT_EQ("ThreadName", a.thread_name()); |
| 135 } | 135 } |
| 136 | 136 |
| 137 // Make sure we can't use a thread between Start() and Init(). | 137 // Make sure we can't use a thread between Start() and Init(). |
| 138 TEST_F(ThreadTest, SleepInsideInit) { | 138 TEST_F(ThreadTest, SleepInsideInit) { |
| 139 SleepInsideInitThread t; | 139 SleepInsideInitThread t; |
| 140 EXPECT_FALSE(t.InitCalled()); | 140 EXPECT_FALSE(t.InitCalled()); |
| 141 t.Start(); | 141 t.Start(); |
| 142 EXPECT_TRUE(t.InitCalled()); | 142 EXPECT_TRUE(t.InitCalled()); |
| 143 } | 143 } |
| 144 |
| 145 TEST(SanityCheck, TestCheck) { |
| 146 LOG(ERROR) << "This line is before the CHECK"; |
| 147 CHECK(false); |
| 148 LOG(ERROR) << "This line is after the CHECK"; |
| 149 } |
| OLD | NEW |