Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Unified Diff: minidump/minidump_system_info_writer_test.cc

Issue 459973002: Add MinidumpMemoryWriter, MinidumpMemoryListWriter, and their test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « minidump/minidump_misc_info_writer_test.cc ('k') | minidump/minidump_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_system_info_writer_test.cc
diff --git a/minidump/minidump_system_info_writer_test.cc b/minidump/minidump_system_info_writer_test.cc
index 41fdc67c7fb4b8857ab6707bd72cd6b147e3802b..98b95d68bde188e4b77b189d8ddf3ea60af6c2b1 100644
--- a/minidump/minidump_system_info_writer_test.cc
+++ b/minidump/minidump_system_info_writer_test.cc
@@ -21,11 +21,13 @@
#include "gtest/gtest.h"
#include "minidump/minidump_file_writer.h"
+#include "minidump/minidump_test_util.h"
#include "util/file/string_file_writer.h"
namespace {
using namespace crashpad;
+using namespace crashpad::test;
void GetSystemInfoStream(const std::string& file_contents,
size_t csd_version_length,
@@ -50,13 +52,10 @@ void GetSystemInfoStream(const std::string& file_contents,
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*>(
« no previous file with comments | « minidump/minidump_misc_info_writer_test.cc ('k') | minidump/minidump_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698