| 32 | bool succeeded); |
| 33 | |
| 34 | TEST(Minidump, DumpCallback) { |
| 35 | testing::internal::CaptureStdout(); |
| 36 | testing::internal::CaptureStderr(); |
| 37 | |
| 38 | google_breakpad::MinidumpDescriptor descriptor("/tmp/arbitrary/path"); |
| 39 | descriptor.UpdatePath(); |
| 40 | DumpCallback(descriptor, nullptr, true); |
| 41 | |
| 42 | std::string stdout = testing::internal::GetCapturedStdout(); |
| 43 | std::string stderr = testing::internal::GetCapturedStderr(); |
| 44 | boost::regex wrote_minidump("Wrote minidump to /tmp/arbitrary/path/.*\\.dmp"); |
| 45 | |
| 46 | for (std::string output : {stdout, stderr}) { |
| 47 | std::vector<std::string> lines; |
| 48 | boost::split(lines, output, boost::is_any_of("\n\r"), boost::token_compress_on); |
| 49 | EXPECT_EQ(3, lines.size()) << output; |
| 50 | EXPECT_EQ("Minidump with no thread info available.", lines[0]) |
| 51 | << lines[0] << "\nOutput:\n" << output; |
| 52 | EXPECT_TRUE(boost::regex_match(lines[1], wrote_minidump)) |
| 53 | << lines[1] << "\nOutput:\n" << output; |
| 54 | EXPECT_EQ("", lines[2]) << output; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | TEST(Minidump, DumpCallbackWithThread) { |
| 59 | testing::internal::CaptureStdout(); |
nothing calls this directly
no test coverage detected