OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <sstream> | 5 #include <sstream> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/debug_util.h" | 8 #include "base/debug_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 << backtrace_message; | 90 << backtrace_message; |
91 | 91 |
92 #endif // define(OS_MACOSX) | 92 #endif // define(OS_MACOSX) |
93 } | 93 } |
94 | 94 |
95 // The test is used for manual testing, e.g., to see the raw output. | 95 // The test is used for manual testing, e.g., to see the raw output. |
96 TEST(StackTrace, DebugOutputToStream) { | 96 TEST(StackTrace, DebugOutputToStream) { |
97 StackTrace trace; | 97 StackTrace trace; |
98 std::ostringstream os; | 98 std::ostringstream os; |
99 trace.OutputToStream(&os); | 99 trace.OutputToStream(&os); |
100 LOG(INFO) << os.str(); | 100 VLOG(1) << os.str(); |
101 } | 101 } |
102 | 102 |
103 // The test is used for manual testing, e.g., to see the raw output. | 103 // The test is used for manual testing, e.g., to see the raw output. |
104 TEST(StackTrace, DebugPrintBacktrace) { | 104 TEST(StackTrace, DebugPrintBacktrace) { |
105 StackTrace().PrintBacktrace(); | 105 StackTrace().PrintBacktrace(); |
106 } | 106 } |
OLD | NEW |