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

Unified Diff: minidump/minidump_memory_writer_test_util.cc

Issue 637503006: Add MinidumpThreadWriter, MinidumpThreadListWriter, and their test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@minidump_memory_writer_test_util
Patch Set: Address review feedback Created 6 years, 2 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_util.h ('k') | minidump/minidump_thread_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_memory_writer_test_util.cc
diff --git a/minidump/minidump_memory_writer_test_util.cc b/minidump/minidump_memory_writer_test_util.cc
index e255e1d89d7e4fe0c566f3bdc54940ddef35fcd6..c7b0c3c5147d6d10fb1ebf4ac2938501771cb01d 100644
--- a/minidump/minidump_memory_writer_test_util.cc
+++ b/minidump/minidump_memory_writer_test_util.cc
@@ -64,12 +64,9 @@ bool TestMinidumpMemoryWriter::WriteObject(FileWriterInterface* file_writer) {
return rv;
}
-void ExpectMinidumpMemoryDescriptorAndContents(
+void ExpectMinidumpMemoryDescriptor(
const MINIDUMP_MEMORY_DESCRIPTOR* expected,
- const MINIDUMP_MEMORY_DESCRIPTOR* observed,
- const std::string& file_contents,
- uint8_t value,
- bool at_eof) {
+ const MINIDUMP_MEMORY_DESCRIPTOR* observed) {
EXPECT_EQ(expected->StartOfMemoryRange, observed->StartOfMemoryRange);
EXPECT_EQ(expected->Memory.DataSize, observed->Memory.DataSize);
if (expected->Memory.Rva != 0) {
@@ -78,6 +75,16 @@ void ExpectMinidumpMemoryDescriptorAndContents(
(expected->Memory.Rva + kMemoryAlignment - 1) & ~(kMemoryAlignment - 1),
observed->Memory.Rva);
}
+}
+
+void ExpectMinidumpMemoryDescriptorAndContents(
+ const MINIDUMP_MEMORY_DESCRIPTOR* expected,
+ const MINIDUMP_MEMORY_DESCRIPTOR* observed,
+ const std::string& file_contents,
+ uint8_t value,
+ bool at_eof) {
+ ExpectMinidumpMemoryDescriptor(expected, observed);
+
if (at_eof) {
EXPECT_EQ(file_contents.size(),
observed->Memory.Rva + observed->Memory.DataSize);
« no previous file with comments | « minidump/minidump_memory_writer_test_util.h ('k') | minidump/minidump_thread_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698