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

Unified Diff: minidump/minidump_system_info_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_string_writer_test.cc ('k') | minidump/minidump_thread_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_system_info_writer_test.cc
diff --git a/minidump/minidump_system_info_writer_test.cc b/minidump/minidump_system_info_writer_test.cc
index f127bc7fbdf87fd8c47ffb805f216332a27343e3..09aa5c1526d2bcd06d1adc22c4985ede7a1ccb8d 100644
--- a/minidump/minidump_system_info_writer_test.cc
+++ b/minidump/minidump_system_info_writer_test.cc
@@ -29,7 +29,7 @@
#include "minidump/test/minidump_string_writer_test_util.h"
#include "minidump/test/minidump_writable_test_util.h"
#include "snapshot/test/test_system_snapshot.h"
-#include "util/file/string_file_writer.h"
+#include "util/file/string_file.h"
namespace crashpad {
namespace test {
@@ -84,14 +84,14 @@ TEST(MinidumpSystemInfoWriter, Empty) {
minidump_file_writer.AddStream(system_info_writer.Pass());
- StringFileWriter file_writer;
- ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
+ StringFile string_file;
+ ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
const MINIDUMP_SYSTEM_INFO* system_info = nullptr;
const MINIDUMP_STRING* csd_version = nullptr;
ASSERT_NO_FATAL_FAILURE(
- GetSystemInfoStream(file_writer.string(), 0, &system_info, &csd_version));
+ GetSystemInfoStream(string_file.string(), 0, &system_info, &csd_version));
EXPECT_EQ(kMinidumpCPUArchitectureUnknown,
system_info->ProcessorArchitecture);
@@ -155,14 +155,14 @@ TEST(MinidumpSystemInfoWriter, X86_Win) {
minidump_file_writer.AddStream(system_info_writer.Pass());
- StringFileWriter file_writer;
- ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
+ StringFile string_file;
+ ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
const MINIDUMP_SYSTEM_INFO* system_info = nullptr;
const MINIDUMP_STRING* csd_version = nullptr;
ASSERT_NO_FATAL_FAILURE(GetSystemInfoStream(
- file_writer.string(), strlen(kCSDVersion), &system_info, &csd_version));
+ string_file.string(), strlen(kCSDVersion), &system_info, &csd_version));
EXPECT_EQ(kCPUArchitecture, system_info->ProcessorArchitecture);
EXPECT_EQ(kCPULevel, system_info->ProcessorLevel);
@@ -215,14 +215,14 @@ TEST(MinidumpSystemInfoWriter, AMD64_Mac) {
minidump_file_writer.AddStream(system_info_writer.Pass());
- StringFileWriter file_writer;
- ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
+ StringFile string_file;
+ ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
const MINIDUMP_SYSTEM_INFO* system_info = nullptr;
const MINIDUMP_STRING* csd_version;
ASSERT_NO_FATAL_FAILURE(GetSystemInfoStream(
- file_writer.string(), strlen(kCSDVersion), &system_info, &csd_version));
+ string_file.string(), strlen(kCSDVersion), &system_info, &csd_version));
EXPECT_EQ(kCPUArchitecture, system_info->ProcessorArchitecture);
EXPECT_EQ(kCPULevel, system_info->ProcessorLevel);
@@ -257,14 +257,14 @@ TEST(MinidumpSystemInfoWriter, X86_CPUVendorFromRegisters) {
minidump_file_writer.AddStream(system_info_writer.Pass());
- StringFileWriter file_writer;
- ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
+ StringFile string_file;
+ ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
const MINIDUMP_SYSTEM_INFO* system_info = nullptr;
const MINIDUMP_STRING* csd_version;
ASSERT_NO_FATAL_FAILURE(
- GetSystemInfoStream(file_writer.string(), 0, &system_info, &csd_version));
+ GetSystemInfoStream(string_file.string(), 0, &system_info, &csd_version));
EXPECT_EQ(kCPUArchitecture, system_info->ProcessorArchitecture);
EXPECT_EQ(0u, system_info->ProcessorLevel);
@@ -337,12 +337,12 @@ TEST(MinidumpSystemInfoWriter, InitializeFromSnapshot_X86) {
MinidumpFileWriter minidump_file_writer;
minidump_file_writer.AddStream(system_info_writer.Pass());
- StringFileWriter file_writer;
- ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
+ StringFile string_file;
+ ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
const MINIDUMP_SYSTEM_INFO* system_info = nullptr;
const MINIDUMP_STRING* csd_version = nullptr;
- ASSERT_NO_FATAL_FAILURE(GetSystemInfoStream(file_writer.string(),
+ ASSERT_NO_FATAL_FAILURE(GetSystemInfoStream(string_file.string(),
strlen(kOSVersionBuild),
&system_info,
&csd_version));
@@ -432,12 +432,12 @@ TEST(MinidumpSystemInfoWriter, InitializeFromSnapshot_AMD64) {
MinidumpFileWriter minidump_file_writer;
minidump_file_writer.AddStream(system_info_writer.Pass());
- StringFileWriter file_writer;
- ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
+ StringFile string_file;
+ ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
const MINIDUMP_SYSTEM_INFO* system_info = nullptr;
const MINIDUMP_STRING* csd_version = nullptr;
- ASSERT_NO_FATAL_FAILURE(GetSystemInfoStream(file_writer.string(),
+ ASSERT_NO_FATAL_FAILURE(GetSystemInfoStream(string_file.string(),
strlen(kOSVersionBuild),
&system_info,
&csd_version));
@@ -470,8 +470,8 @@ TEST(MinidumpSystemInfoWriterDeathTest, NoCSDVersion) {
auto system_info_writer = make_scoped_ptr(new MinidumpSystemInfoWriter());
minidump_file_writer.AddStream(system_info_writer.Pass());
- StringFileWriter file_writer;
- ASSERT_DEATH(minidump_file_writer.WriteEverything(&file_writer),
+ StringFile string_file;
+ ASSERT_DEATH(minidump_file_writer.WriteEverything(&string_file),
"csd_version_");
}
« no previous file with comments | « minidump/minidump_string_writer_test.cc ('k') | minidump/minidump_thread_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698