| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <limits> | 5 #include <limits> |
| 6 #include <sstream> | 6 #include <sstream> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Expect to find this function as well. | 113 // Expect to find this function as well. |
| 114 // Note: This will fail if not linked with -rdynamic (aka -export_dynamic) | 114 // Note: This will fail if not linked with -rdynamic (aka -export_dynamic) |
| 115 EXPECT_TRUE(backtrace_message.find(__func__) != std::string::npos) | 115 EXPECT_TRUE(backtrace_message.find(__func__) != std::string::npos) |
| 116 << "Expected to find " << __func__ << " in backtrace:\n" | 116 << "Expected to find " << __func__ << " in backtrace:\n" |
| 117 << backtrace_message; | 117 << backtrace_message; |
| 118 | 118 |
| 119 #endif // define(OS_MACOSX) | 119 #endif // define(OS_MACOSX) |
| 120 } | 120 } |
| 121 | 121 |
| 122 // The test is used for manual testing, e.g., to see the raw output. | 122 // The test is used for manual testing, e.g., to see the raw output. |
| 123 TEST_F(StackTraceTest, DebugOutputToStream) { | 123 // TODO(scottmg): http://crbug.com/461160 |
| 124 TEST_F(StackTraceTest, DISABLED_DebugOutputToStream) { |
| 124 StackTrace trace; | 125 StackTrace trace; |
| 125 std::ostringstream os; | 126 std::ostringstream os; |
| 126 trace.OutputToStream(&os); | 127 trace.OutputToStream(&os); |
| 127 VLOG(1) << os.str(); | 128 VLOG(1) << os.str(); |
| 128 } | 129 } |
| 129 | 130 |
| 130 // The test is used for manual testing, e.g., to see the raw output. | 131 // The test is used for manual testing, e.g., to see the raw output. |
| 131 TEST_F(StackTraceTest, DebugPrintBacktrace) { | 132 // TODO(scottmg): http://crbug.com/461160 |
| 133 TEST_F(StackTraceTest, DISABLED_DebugPrintBacktrace) { |
| 132 StackTrace().Print(); | 134 StackTrace().Print(); |
| 133 } | 135 } |
| 134 #endif // !defined(__UCLIBC__) | 136 #endif // !defined(__UCLIBC__) |
| 135 | 137 |
| 136 #if defined(OS_POSIX) && !defined(OS_ANDROID) | 138 #if defined(OS_POSIX) && !defined(OS_ANDROID) |
| 137 #if !defined(OS_IOS) | 139 #if !defined(OS_IOS) |
| 138 MULTIPROCESS_TEST_MAIN(MismatchedMallocChildProcess) { | 140 MULTIPROCESS_TEST_MAIN(MismatchedMallocChildProcess) { |
| 139 char* pointer = new char[10]; | 141 char* pointer = new char[10]; |
| 140 delete pointer; | 142 delete pointer; |
| 141 return 2; | 143 return 2; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 EXPECT_EQ("688", itoa_r_wrapper(0x688, 128, 16, 1)); | 226 EXPECT_EQ("688", itoa_r_wrapper(0x688, 128, 16, 1)); |
| 225 EXPECT_EQ("688", itoa_r_wrapper(0x688, 128, 16, 2)); | 227 EXPECT_EQ("688", itoa_r_wrapper(0x688, 128, 16, 2)); |
| 226 EXPECT_EQ("688", itoa_r_wrapper(0x688, 128, 16, 3)); | 228 EXPECT_EQ("688", itoa_r_wrapper(0x688, 128, 16, 3)); |
| 227 EXPECT_EQ("0688", itoa_r_wrapper(0x688, 128, 16, 4)); | 229 EXPECT_EQ("0688", itoa_r_wrapper(0x688, 128, 16, 4)); |
| 228 EXPECT_EQ("00688", itoa_r_wrapper(0x688, 128, 16, 5)); | 230 EXPECT_EQ("00688", itoa_r_wrapper(0x688, 128, 16, 5)); |
| 229 } | 231 } |
| 230 #endif // defined(OS_POSIX) && !defined(OS_ANDROID) | 232 #endif // defined(OS_POSIX) && !defined(OS_ANDROID) |
| 231 | 233 |
| 232 } // namespace debug | 234 } // namespace debug |
| 233 } // namespace base | 235 } // namespace base |
| OLD | NEW |