Index: minidump/minidump_misc_info_writer_test.cc |
diff --git a/minidump/minidump_misc_info_writer_test.cc b/minidump/minidump_misc_info_writer_test.cc |
index 5ccfd8eacfe37cb12afda8ffe4d04708c11e1780..ca22b5929a8cdf40feef8addeb26b73f69164497 100644 |
--- a/minidump/minidump_misc_info_writer_test.cc |
+++ b/minidump/minidump_misc_info_writer_test.cc |
@@ -24,12 +24,14 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "gtest/gtest.h" |
#include "minidump/minidump_file_writer.h" |
+#include "minidump/minidump_test_util.h" |
#include "util/file/string_file_writer.h" |
#include "util/stdlib/strlcpy.h" |
namespace { |
using namespace crashpad; |
+using namespace crashpad::test; |
template <typename T> |
void GetMiscInfoStream(const std::string& file_contents, const T** misc_info) { |
@@ -44,13 +46,10 @@ void GetMiscInfoStream(const std::string& file_contents, const T** misc_info) { |
const MINIDUMP_HEADER* header = |
reinterpret_cast<const MINIDUMP_HEADER*>(&file_contents[0]); |
- EXPECT_EQ(static_cast<uint32_t>(MINIDUMP_SIGNATURE), header->Signature); |
- EXPECT_EQ(static_cast<uint32_t>(MINIDUMP_VERSION), header->Version); |
- ASSERT_EQ(1u, header->NumberOfStreams); |
- ASSERT_EQ(kDirectoryOffset, header->StreamDirectoryRva); |
- EXPECT_EQ(0u, header->CheckSum); |
- EXPECT_EQ(0u, header->TimeDateStamp); |
- EXPECT_EQ(MiniDumpNormal, header->Flags); |
+ VerifyMinidumpHeader(header, 1, 0); |
+ if (testing::Test::HasFatalFailure()) { |
+ return; |
+ } |
const MINIDUMP_DIRECTORY* directory = |
reinterpret_cast<const MINIDUMP_DIRECTORY*>( |