Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: base/debug_util_unittest.cc

Issue 545148: Import google-glog's Symbolize() and use it in debug_util_posix.cc. (Closed)
Patch Set: Fix checkdeps.py error Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #endif 84 #endif
85 85
86 // Expect to find this function as well. 86 // Expect to find this function as well.
87 // Note: This will fail if not linked with -rdynamic (aka -export_dynamic) 87 // Note: This will fail if not linked with -rdynamic (aka -export_dynamic)
88 EXPECT_TRUE(backtrace_message.find(__func__) != std::string::npos) 88 EXPECT_TRUE(backtrace_message.find(__func__) != std::string::npos)
89 << "Expected to find " << __func__ << " in backtrace:\n" 89 << "Expected to find " << __func__ << " in backtrace:\n"
90 << backtrace_message; 90 << backtrace_message;
91 91
92 #endif // define(OS_MACOSX) 92 #endif // define(OS_MACOSX)
93 } 93 }
94
95 // The test is used for manual testing (i.e. see the raw output).
96 // To run the test use the flags:
97 // --gtest_filter='*DebugOutputToStream' --gtest_also_run_disabled_tests
98 TEST(StackTrace, DISABLED_DebugOutputToStream) {
99 StackTrace trace;
100 std::ostringstream os;
101 trace.OutputToStream(&os);
102 LOG(INFO) << os.str();
103 }
104
105 // The test is used for manual testing. See the comment above.
106 TEST(StackTrace, DISABLED_DebugPrintBacktrace) {
107 StackTrace().PrintBacktrace();
108 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698