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 "mojo/public/c/environment/logger.h" | |
6 #include "mojo/public/cpp/environment/environment.h" | |
7 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 #include "third_party/mojo/src/mojo/public/c/environment/logger.h" |
| 7 #include "third_party/mojo/src/mojo/public/cpp/environment/environment.h" |
8 | 8 |
9 namespace mojo { | 9 namespace mojo { |
10 namespace { | 10 namespace { |
11 | 11 |
12 TEST(LoggerTest, Basic) { | 12 TEST(LoggerTest, Basic) { |
13 const char kPath[] = "/fake/path/to/file.cc"; | 13 const char kPath[] = "/fake/path/to/file.cc"; |
14 | 14 |
15 Environment environment; | 15 Environment environment; |
16 const MojoLogger* const logger = Environment::GetDefaultLogger(); | 16 const MojoLogger* const logger = Environment::GetDefaultLogger(); |
17 | 17 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 // This should kill us: | 81 // This should kill us: |
82 EXPECT_DEATH_IF_SUPPORTED({ | 82 EXPECT_DEATH_IF_SUPPORTED({ |
83 logger->LogMessage(MOJO_LOG_LEVEL_FATAL, nullptr, 0, | 83 logger->LogMessage(MOJO_LOG_LEVEL_FATAL, nullptr, 0, |
84 "Logged at FATAL level"); | 84 "Logged at FATAL level"); |
85 }, ""); | 85 }, ""); |
86 } | 86 } |
87 | 87 |
88 } // namespace | 88 } // namespace |
89 } // namespace mojo | 89 } // namespace mojo |
OLD | NEW |