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

Unified Diff: minidump/minidump_misc_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_memory_writer_test.cc ('k') | minidump/minidump_system_info_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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*>(
« no previous file with comments | « minidump/minidump_memory_writer_test.cc ('k') | minidump/minidump_system_info_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698