diff options
author | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-11-23 14:22:05 +0000 |
---|---|---|
committer | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-11-23 14:22:05 +0000 |
commit | bad70be095dd93ecc9c28bab90bed0c86fbdedca (patch) | |
tree | 6f6a1ac9584f998128dbe5f0e4a4bbc254fb788b /src/client/mac/tests/crash_generation_server_test.cc | |
parent | Rename md5.c to md5.cc, put its contents inside the google_breakpad namespace. (diff) | |
download | breakpad-bad70be095dd93ecc9c28bab90bed0c86fbdedca.tar.xz |
Correct compilation warning.
1) Modify src/common/mac/macho_walker.cc to remove a signed vs unsigned comparison.
2) Replace mktemp in test using AutoTmpDir that has been moved from client/mac/tests to common/tests.
Review URL: http://breakpad.appspot.com/328001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@888 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/tests/crash_generation_server_test.cc')
-rw-r--r-- | src/client/mac/tests/crash_generation_server_test.cc | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/client/mac/tests/crash_generation_server_test.cc b/src/client/mac/tests/crash_generation_server_test.cc index fdb9cdd1..f71624df 100644 --- a/src/client/mac/tests/crash_generation_server_test.cc +++ b/src/client/mac/tests/crash_generation_server_test.cc @@ -43,8 +43,8 @@ #include "client/mac/crash_generation/crash_generation_client.h" #include "client/mac/crash_generation/crash_generation_server.h" #include "client/mac/handler/exception_handler.h" -#include "client/mac/tests/auto_tempdir.h" #include "client/mac/tests/spawn_child_process.h" +#include "common/tests/auto_tempdir.h" #include "google_breakpad/processor/minidump.h" namespace google_breakpad { @@ -111,12 +111,12 @@ TEST_F(CrashGenerationServerTest, testStartStopServer) { // Test without actually dumping TEST_F(CrashGenerationServerTest, testRequestDumpNoDump) { CrashGenerationServer server(mach_port_name, - NULL, // dump callback - NULL, // dump context - NULL, // exit callback - NULL, // exit context - false, // don't generate dumps - temp_dir.path); // dump path + NULL, // dump callback + NULL, // dump context + NULL, // exit callback + NULL, // exit context + false, // don't generate dumps + temp_dir.path()); // dump path ASSERT_TRUE(server.Start()); pid_t pid = fork(); @@ -133,7 +133,7 @@ TEST_F(CrashGenerationServerTest, testRequestDumpNoDump) { EXPECT_EQ(0, WEXITSTATUS(ret)); EXPECT_TRUE(server.Stop()); // check that no minidump was written - string pattern = temp_dir.path + "/*"; + string pattern = temp_dir.path() + "/*"; glob_t dirContents; ret = glob(pattern.c_str(), GLOB_NOSORT, NULL, &dirContents); EXPECT_EQ(GLOB_NOMATCH, ret); @@ -161,12 +161,12 @@ void *RequestDump(void *context) { // Test that actually writing a minidump works TEST_F(CrashGenerationServerTest, testRequestDump) { CrashGenerationServer server(mach_port_name, - dumpCallback, // dump callback - this, // dump context - NULL, // exit callback - NULL, // exit context - true, // generate dumps - temp_dir.path); // dump path + dumpCallback, // dump callback + this, // dump context + NULL, // exit callback + NULL, // exit context + true, // generate dumps + temp_dir.path()); // dump path ASSERT_TRUE(server.Start()); pid_t pid = fork(); @@ -209,12 +209,12 @@ static void Crasher() { // the parent. TEST_F(CrashGenerationServerTest, testChildProcessCrash) { CrashGenerationServer server(mach_port_name, - dumpCallback, // dump callback - this, // dump context - NULL, // exit callback - NULL, // exit context - true, // generate dumps - temp_dir.path); // dump path + dumpCallback, // dump callback + this, // dump context + NULL, // exit callback + NULL, // exit context + true, // generate dumps + temp_dir.path()); // dump path ASSERT_TRUE(server.Start()); pid_t pid = fork(); @@ -270,12 +270,12 @@ TEST_F(CrashGenerationServerTest, testChildProcessCrash) { // produces a valid minidump. TEST_F(CrashGenerationServerTest, testChildProcessCrashCrossArchitecture) { CrashGenerationServer server(mach_port_name, - dumpCallback, // dump callback - this, // dump context - NULL, // exit callback - NULL, // exit context - true, // generate dumps - temp_dir.path); // dump path + dumpCallback, // dump callback + this, // dump context + NULL, // exit callback + NULL, // exit context + true, // generate dumps + temp_dir.path()); // dump path ASSERT_TRUE(server.Start()); // Spawn a child process |