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

Unified Diff: minidump/minidump_context_writer_test.cc

Issue 670853002: minidump: Migrate the rest of the tests to MinidumpWritableAtLocationDescriptor<>() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
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 | « no previous file | minidump/minidump_crashpad_info_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_context_writer_test.cc
diff --git a/minidump/minidump_context_writer_test.cc b/minidump/minidump_context_writer_test.cc
index 43f64761b912e7b3050e37c081ea99561299a7f6..935951457e430f3bf38f080c787a87bb556c642b 100644
--- a/minidump/minidump_context_writer_test.cc
+++ b/minidump/minidump_context_writer_test.cc
@@ -19,6 +19,7 @@
#include "gtest/gtest.h"
#include "minidump/minidump_context.h"
#include "minidump/test/minidump_context_test_util.h"
+#include "minidump/test/minidump_writable_test_util.h"
#include "util/file/string_file_writer.h"
namespace crashpad {
@@ -39,7 +40,7 @@ TEST(MinidumpContextWriter, MinidumpContextX86Writer) {
ASSERT_EQ(sizeof(MinidumpContextX86), file_writer.string().size());
const MinidumpContextX86* observed =
- reinterpret_cast<const MinidumpContextX86*>(&file_writer.string()[0]);
+ MinidumpWritableAtRVA<MinidumpContextX86>(file_writer.string(), 0);
ExpectMinidumpContextX86(0, observed);
}
@@ -56,7 +57,7 @@ TEST(MinidumpContextWriter, MinidumpContextX86Writer) {
ASSERT_EQ(sizeof(MinidumpContextX86), file_writer.string().size());
const MinidumpContextX86* observed =
- reinterpret_cast<const MinidumpContextX86*>(&file_writer.string()[0]);
+ MinidumpWritableAtRVA<MinidumpContextX86>(file_writer.string(), 0);
ExpectMinidumpContextX86(kSeed, observed);
}
}
@@ -75,7 +76,7 @@ TEST(MinidumpContextWriter, MinidumpContextAMD64Writer) {
ASSERT_EQ(sizeof(MinidumpContextAMD64), file_writer.string().size());
const MinidumpContextAMD64* observed =
- reinterpret_cast<const MinidumpContextAMD64*>(&file_writer.string()[0]);
+ MinidumpWritableAtRVA<MinidumpContextAMD64>(file_writer.string(), 0);
ExpectMinidumpContextAMD64(0, observed);
}
@@ -92,7 +93,7 @@ TEST(MinidumpContextWriter, MinidumpContextAMD64Writer) {
ASSERT_EQ(sizeof(MinidumpContextAMD64), file_writer.string().size());
const MinidumpContextAMD64* observed =
- reinterpret_cast<const MinidumpContextAMD64*>(&file_writer.string()[0]);
+ MinidumpWritableAtRVA<MinidumpContextAMD64>(file_writer.string(), 0);
ExpectMinidumpContextAMD64(kSeed, observed);
}
}
« no previous file with comments | « no previous file | minidump/minidump_crashpad_info_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698