| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "debug.h" | 5 #include "debug.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 #include <string> | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 9 |
| 11 namespace relocation_packer { | 10 namespace relocation_packer { |
| 12 | 11 |
| 13 TEST(Debug, Log) { | 12 TEST(Debug, Log) { |
| 14 Logger::Reset(); | 13 Logger::Reset(); |
| 15 std::ostringstream info; | 14 std::ostringstream info; |
| 16 std::ostringstream error; | 15 std::ostringstream error; |
| 17 Logger::SetStreams(&info, &error); | 16 Logger::SetStreams(&info, &error); |
| 18 | 17 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 EXPECT_DEATH(CHECK(0 == 1), "FATAL: .*:.*: .*: CHECK '0 == 1' failed"); | 113 EXPECT_DEATH(CHECK(0 == 1), "FATAL: .*:.*: .*: CHECK '0 == 1' failed"); |
| 115 } | 114 } |
| 116 | 115 |
| 117 TEST(DebugDeathTest, NotReached) { | 116 TEST(DebugDeathTest, NotReached) { |
| 118 ::testing::FLAGS_gtest_death_test_style = "threadsafe"; | 117 ::testing::FLAGS_gtest_death_test_style = "threadsafe"; |
| 119 Logger::Reset(); | 118 Logger::Reset(); |
| 120 EXPECT_DEATH(NOTREACHED(), "FATAL: .*:.*: .*: NOTREACHED\\(\\) hit"); | 119 EXPECT_DEATH(NOTREACHED(), "FATAL: .*:.*: .*: NOTREACHED\\(\\) hit"); |
| 121 } | 120 } |
| 122 | 121 |
| 123 } // namespace relocation_packer | 122 } // namespace relocation_packer |
| OLD | NEW |