Index: minidump/minidump_string_writer_test.cc |
diff --git a/minidump/minidump_string_writer_test.cc b/minidump/minidump_string_writer_test.cc |
index aa8e48c6a3c77e3200713bc0be05f2da678c1ad7..c5bcc49c04f30f9a3483e7372061f80bd1718b29 100644 |
--- a/minidump/minidump_string_writer_test.cc |
+++ b/minidump/minidump_string_writer_test.cc |
@@ -53,6 +53,23 @@ TEST(MinidumpStringWriter, MinidumpUTF16StringWriter) { |
MinidumpStringAtRVAAsString(string_file.string(), 0)); |
} |
+ { |
+ SCOPED_TRACE("no conversion"); |
+ string_file.Reset(); |
+ crashpad::internal::MinidumpUTF16StringWriter string_writer; |
+ const base::string16 kString(L"oóöőo"); |
Mark Mentovai
2015/10/21 16:53:51
This was inspired by all of the different kinds of
|
+ string_writer.SetUTF16(kString); |
+ EXPECT_TRUE(string_writer.WriteEverything(&string_file)); |
+ ASSERT_EQ( |
+ sizeof(MINIDUMP_STRING) + (kString.size() + 1) * sizeof(kString[0]), |
+ string_file.string().size()); |
+ |
+ const MINIDUMP_STRING* minidump_string = |
+ MinidumpStringAtRVA(string_file.string(), 0); |
+ EXPECT_TRUE(minidump_string); |
+ EXPECT_EQ(kString, MinidumpStringAtRVAAsString(string_file.string(), 0)); |
+ } |
+ |
const struct { |
size_t input_length; |
const char* input_string; |