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

Unified Diff: minidump/minidump_location_descriptor_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_file_writer_test.cc ('k') | minidump/minidump_memory_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_location_descriptor_list_writer_test.cc
diff --git a/minidump/minidump_location_descriptor_list_writer_test.cc b/minidump/minidump_location_descriptor_list_writer_test.cc
index 00743063f1ed8d97454dc4b6fdbf8009c5fca66d..8bba6ff1f1d57ca867496bf16b5d800133a71a67 100644
--- a/minidump/minidump_location_descriptor_list_writer_test.cc
+++ b/minidump/minidump_location_descriptor_list_writer_test.cc
@@ -19,7 +19,7 @@
#include "gtest/gtest.h"
#include "minidump/test/minidump_location_descriptor_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 {
@@ -46,14 +46,14 @@ class TestMinidumpLocationDescriptorListWriter final
TEST(MinidumpLocationDescriptorListWriter, Empty) {
TestMinidumpLocationDescriptorListWriter list_writer;
- StringFileWriter file_writer;
+ StringFile string_file;
- ASSERT_TRUE(list_writer.WriteEverything(&file_writer));
+ ASSERT_TRUE(list_writer.WriteEverything(&string_file));
EXPECT_EQ(sizeof(MinidumpLocationDescriptorList),
- file_writer.string().size());
+ string_file.string().size());
const MinidumpLocationDescriptorList* list =
- MinidumpLocationDescriptorListAtStart(file_writer.string(), 0);
+ MinidumpLocationDescriptorListAtStart(string_file.string(), 0);
ASSERT_TRUE(list);
}
@@ -63,16 +63,16 @@ TEST(MinidumpLocationDescriptorListWriter, 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 MinidumpLocationDescriptorList* list =
- MinidumpLocationDescriptorListAtStart(file_writer.string(), 1);
+ MinidumpLocationDescriptorListAtStart(string_file.string(), 1);
ASSERT_TRUE(list);
const uint32_t* child = MinidumpWritableAtLocationDescriptor<uint32_t>(
- file_writer.string(), list->children[0]);
+ string_file.string(), list->children[0]);
ASSERT_TRUE(child);
EXPECT_EQ(kValue, *child);
}
@@ -86,12 +86,12 @@ TEST(MinidumpLocationDescriptorListWriter, 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 MinidumpLocationDescriptorList* list =
- MinidumpLocationDescriptorListAtStart(file_writer.string(),
+ MinidumpLocationDescriptorListAtStart(string_file.string(),
arraysize(kValues));
ASSERT_TRUE(list);
@@ -99,7 +99,7 @@ TEST(MinidumpLocationDescriptorListWriter, ThreeChildren) {
SCOPED_TRACE(base::StringPrintf("index %" PRIuS, index));
const uint32_t* child = MinidumpWritableAtLocationDescriptor<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_file_writer_test.cc ('k') | minidump/minidump_memory_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698