summaryrefslogtreecommitdiffstats
path: root/base/debug_util_unittest.cc
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-24 15:36:41 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-24 15:36:41 +0000
commitde1b764f404e5fb6975e7cc9de7120d46e28dcfd (patch)
treea78c93224e5961801276e04ccc95170d9adc900b /base/debug_util_unittest.cc
parentf348ec426e02681341a856cabbedf58742b9bed2 (diff)
downloadchromium_src-de1b764f404e5fb6975e7cc9de7120d46e28dcfd.zip
chromium_src-de1b764f404e5fb6975e7cc9de7120d46e28dcfd.tar.gz
chromium_src-de1b764f404e5fb6975e7cc9de7120d46e28dcfd.tar.bz2
Fix StackTrace on Windows.
The previous implementation was overly verbose. The new one is now functional and the unit test now works. TEST=unit_test BUG=none Review URL: http://codereview.chromium.org/174250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/debug_util_unittest.cc')
-rw-r--r--base/debug_util_unittest.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/base/debug_util_unittest.cc b/base/debug_util_unittest.cc
index 418dc0a..e81b1b7 100644
--- a/base/debug_util_unittest.cc
+++ b/base/debug_util_unittest.cc
@@ -19,17 +19,13 @@ TEST(StackTrace, OutputToStream) {
size_t frames_found = 0;
trace.Addresses(&frames_found);
- if (frames_found == 0) {
- LOG(ERROR) << "No stack frames found. Skipping rest of test.";
- return;
- }
+ ASSERT_GE(frames_found, 5u) <<
+ "No stack frames found. Skipping rest of test.";
// Check if the output has symbol initialization warning. If it does, fail.
- if (backtrace_message.find("Dumping unresolved backtrace") !=
- std::string::npos) {
- LOG(ERROR) << "Unable to resolve symbols. Skipping rest of test.";
- return;
- }
+ ASSERT_EQ(backtrace_message.find("Dumping unresolved backtrace"),
+ std::string::npos) <<
+ "Unable to resolve symbols. Skipping rest of test.";
#if 0
//TODO(ajwong): Disabling checking of symbol resolution since it depends
@@ -39,7 +35,7 @@ TEST(StackTrace, OutputToStream) {
// Symbol resolution via the backtrace_symbol funciton does not work well
// in OsX.
- // See this thread:
+ // See this thread:
//
// http://lists.apple.com/archives/darwin-dev/2009/Mar/msg00111.html
//