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

Side by Side Diff: minidump/minidump_simple_string_dictionary_writer_test.cc

Issue 983103004: win: fixes for Windows x64 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: mac Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « minidump/minidump_module_writer.cc ('k') | minidump/minidump_thread_id_map.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 13 matching lines...) Expand all
24 #include "util/file/string_file.h" 24 #include "util/file/string_file.h"
25 25
26 namespace crashpad { 26 namespace crashpad {
27 namespace test { 27 namespace test {
28 namespace { 28 namespace {
29 29
30 const MinidumpSimpleStringDictionary* MinidumpSimpleStringDictionaryAtStart( 30 const MinidumpSimpleStringDictionary* MinidumpSimpleStringDictionaryAtStart(
31 const std::string& file_contents, 31 const std::string& file_contents,
32 size_t count) { 32 size_t count) {
33 MINIDUMP_LOCATION_DESCRIPTOR location_descriptor; 33 MINIDUMP_LOCATION_DESCRIPTOR location_descriptor;
34 location_descriptor.DataSize = 34 location_descriptor.DataSize = static_cast<uint32_t>(
35 sizeof(MinidumpSimpleStringDictionary) + 35 sizeof(MinidumpSimpleStringDictionary) +
36 count * sizeof(MinidumpSimpleStringDictionaryEntry); 36 count * sizeof(MinidumpSimpleStringDictionaryEntry));
37 location_descriptor.Rva = 0; 37 location_descriptor.Rva = 0;
38 return MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( 38 return MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>(
39 file_contents, location_descriptor); 39 file_contents, location_descriptor);
40 } 40 }
41 41
42 TEST(MinidumpSimpleStringDictionaryWriter, EmptySimpleStringDictionary) { 42 TEST(MinidumpSimpleStringDictionaryWriter, EmptySimpleStringDictionary) {
43 StringFile string_file; 43 StringFile string_file;
44 44
45 MinidumpSimpleStringDictionaryWriter dictionary_writer; 45 MinidumpSimpleStringDictionaryWriter dictionary_writer;
46 46
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 MinidumpUTF8StringAtRVAAsString(string_file.string(), 278 MinidumpUTF8StringAtRVAAsString(string_file.string(),
279 dictionary->entries[2].key)); 279 dictionary->entries[2].key));
280 EXPECT_EQ(kValue2, 280 EXPECT_EQ(kValue2,
281 MinidumpUTF8StringAtRVAAsString(string_file.string(), 281 MinidumpUTF8StringAtRVAAsString(string_file.string(),
282 dictionary->entries[2].value)); 282 dictionary->entries[2].value));
283 } 283 }
284 284
285 } // namespace 285 } // namespace
286 } // namespace test 286 } // namespace test
287 } // namespace crashpad 287 } // namespace crashpad
OLDNEW
« no previous file with comments | « minidump/minidump_module_writer.cc ('k') | minidump/minidump_thread_id_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698