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

Unified Diff: minidump/minidump_rva_list_writer_test.cc

Issue 936153002: Add FileReaderInterface. Move StringFileWriter to StringFile and (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Remove unused #include Created 5 years, 10 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_module_writer_test.cc ('k') | minidump/minidump_simple_string_dictionary_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_rva_list_writer_test.cc
diff --git a/minidump/minidump_rva_list_writer_test.cc b/minidump/minidump_rva_list_writer_test.cc
index 0754748ae79b8e4e759cc46e3731ef35ac685c0e..f2594003fb2109ad4eb5f9adafc1752c4f0d1223 100644
--- a/minidump/minidump_rva_list_writer_test.cc
+++ b/minidump/minidump_rva_list_writer_test.cc
@@ -19,7 +19,7 @@
#include "gtest/gtest.h"
#include "minidump/test/minidump_rva_list_test_util.h"
#include "minidump/test/minidump_writable_test_util.h"
-#include "util/file/string_file_writer.h"
+#include "util/file/string_file.h"
namespace crashpad {
namespace test {
@@ -42,12 +42,12 @@ class TestMinidumpRVAListWriter final : public internal::MinidumpRVAListWriter {
TEST(MinidumpRVAListWriter, Empty) {
TestMinidumpRVAListWriter list_writer;
- StringFileWriter file_writer;
+ StringFile string_file;
- ASSERT_TRUE(list_writer.WriteEverything(&file_writer));
- EXPECT_EQ(sizeof(MinidumpRVAList), file_writer.string().size());
+ ASSERT_TRUE(list_writer.WriteEverything(&string_file));
+ EXPECT_EQ(sizeof(MinidumpRVAList), string_file.string().size());
- const MinidumpRVAList* list = MinidumpRVAListAtStart(file_writer.string(), 0);
+ const MinidumpRVAList* list = MinidumpRVAListAtStart(string_file.string(), 0);
ASSERT_TRUE(list);
}
@@ -57,15 +57,15 @@ TEST(MinidumpRVAListWriter, OneChild) {
const uint32_t kValue = 0;
list_writer.AddChild(kValue);
- StringFileWriter file_writer;
+ StringFile string_file;
- ASSERT_TRUE(list_writer.WriteEverything(&file_writer));
+ ASSERT_TRUE(list_writer.WriteEverything(&string_file));
- const MinidumpRVAList* list = MinidumpRVAListAtStart(file_writer.string(), 1);
+ const MinidumpRVAList* list = MinidumpRVAListAtStart(string_file.string(), 1);
ASSERT_TRUE(list);
const uint32_t* child = MinidumpWritableAtRVA<uint32_t>(
- file_writer.string(), list->children[0]);
+ string_file.string(), list->children[0]);
ASSERT_TRUE(child);
EXPECT_EQ(kValue, *child);
}
@@ -79,19 +79,19 @@ TEST(MinidumpRVAListWriter, ThreeChildren) {
list_writer.AddChild(kValues[1]);
list_writer.AddChild(kValues[2]);
- StringFileWriter file_writer;
+ StringFile string_file;
- ASSERT_TRUE(list_writer.WriteEverything(&file_writer));
+ ASSERT_TRUE(list_writer.WriteEverything(&string_file));
const MinidumpRVAList* list =
- MinidumpRVAListAtStart(file_writer.string(), arraysize(kValues));
+ MinidumpRVAListAtStart(string_file.string(), arraysize(kValues));
ASSERT_TRUE(list);
for (size_t index = 0; index < arraysize(kValues); ++index) {
SCOPED_TRACE(base::StringPrintf("index %" PRIuS, index));
const uint32_t* child = MinidumpWritableAtRVA<uint32_t>(
- file_writer.string(), list->children[index]);
+ string_file.string(), list->children[index]);
ASSERT_TRUE(child);
EXPECT_EQ(kValues[index], *child);
}
« no previous file with comments | « minidump/minidump_module_writer_test.cc ('k') | minidump/minidump_simple_string_dictionary_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698