OLD | NEW |
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, |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
13 // limitations under the License. | 13 // limitations under the License. |
14 | 14 |
15 #include "minidump/minidump_module_crashpad_info_writer.h" | 15 #include "minidump/minidump_module_crashpad_info_writer.h" |
16 | 16 |
17 #include <dbghelp.h> | 17 #include <dbghelp.h> |
18 | 18 |
19 #include "gtest/gtest.h" | 19 #include "gtest/gtest.h" |
20 #include "minidump/minidump_extensions.h" | 20 #include "minidump/minidump_extensions.h" |
21 #include "minidump/minidump_simple_string_dictionary_writer.h" | 21 #include "minidump/minidump_simple_string_dictionary_writer.h" |
22 #include "minidump/test/minidump_file_writer_test_util.h" | 22 #include "minidump/test/minidump_file_writer_test_util.h" |
| 23 #include "minidump/test/minidump_location_descriptor_list_test_util.h" |
23 #include "minidump/test/minidump_string_writer_test_util.h" | 24 #include "minidump/test/minidump_string_writer_test_util.h" |
24 #include "minidump/test/minidump_writable_test_util.h" | 25 #include "minidump/test/minidump_writable_test_util.h" |
25 #include "snapshot/test/test_module_snapshot.h" | 26 #include "snapshot/test/test_module_snapshot.h" |
26 #include "util/file/string_file_writer.h" | 27 #include "util/file/string_file_writer.h" |
27 | 28 |
28 namespace crashpad { | 29 namespace crashpad { |
29 namespace test { | 30 namespace test { |
30 namespace { | 31 namespace { |
31 | 32 |
32 const MinidumpModuleCrashpadInfoList* MinidumpModuleCrashpadInfoListAtStart( | |
33 const std::string& file_contents, | |
34 size_t count) { | |
35 MINIDUMP_LOCATION_DESCRIPTOR location_descriptor; | |
36 location_descriptor.DataSize = sizeof(MinidumpModuleCrashpadInfoList) + | |
37 count * sizeof(MINIDUMP_LOCATION_DESCRIPTOR); | |
38 location_descriptor.Rva = 0; | |
39 return MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfoList>( | |
40 file_contents, location_descriptor); | |
41 } | |
42 | |
43 TEST(MinidumpModuleCrashpadInfoWriter, EmptyList) { | 33 TEST(MinidumpModuleCrashpadInfoWriter, EmptyList) { |
44 StringFileWriter file_writer; | 34 StringFileWriter file_writer; |
45 | 35 |
46 MinidumpModuleCrashpadInfoListWriter module_list_writer; | 36 MinidumpModuleCrashpadInfoListWriter module_list_writer; |
47 | 37 |
48 EXPECT_TRUE(module_list_writer.WriteEverything(&file_writer)); | 38 EXPECT_TRUE(module_list_writer.WriteEverything(&file_writer)); |
49 ASSERT_EQ(sizeof(MinidumpModuleCrashpadInfoList), | 39 ASSERT_EQ(sizeof(MinidumpModuleCrashpadInfoList), |
50 file_writer.string().size()); | 40 file_writer.string().size()); |
51 | 41 |
52 const MinidumpModuleCrashpadInfoList* module_list = | 42 const MinidumpModuleCrashpadInfoList* module_list = |
53 MinidumpModuleCrashpadInfoListAtStart(file_writer.string(), 0); | 43 MinidumpLocationDescriptorListAtStart(file_writer.string(), 0); |
54 ASSERT_TRUE(module_list); | 44 ASSERT_TRUE(module_list); |
55 | |
56 EXPECT_EQ(0u, module_list->count); | |
57 } | 45 } |
58 | 46 |
59 TEST(MinidumpModuleCrashpadInfoWriter, EmptyModule) { | 47 TEST(MinidumpModuleCrashpadInfoWriter, EmptyModule) { |
60 StringFileWriter file_writer; | 48 StringFileWriter file_writer; |
61 | 49 |
62 MinidumpModuleCrashpadInfoListWriter module_list_writer; | 50 MinidumpModuleCrashpadInfoListWriter module_list_writer; |
63 auto module_writer = | 51 auto module_writer = |
64 make_scoped_ptr(new MinidumpModuleCrashpadInfoWriter()); | 52 make_scoped_ptr(new MinidumpModuleCrashpadInfoWriter()); |
65 EXPECT_FALSE(module_writer->IsUseful()); | 53 EXPECT_FALSE(module_writer->IsUseful()); |
66 module_list_writer.AddModule(module_writer.Pass()); | 54 module_list_writer.AddModule(module_writer.Pass()); |
67 | 55 |
68 EXPECT_TRUE(module_list_writer.WriteEverything(&file_writer)); | 56 EXPECT_TRUE(module_list_writer.WriteEverything(&file_writer)); |
69 ASSERT_EQ(sizeof(MinidumpModuleCrashpadInfoList) + | 57 ASSERT_EQ(sizeof(MinidumpModuleCrashpadInfoList) + |
70 sizeof(MINIDUMP_LOCATION_DESCRIPTOR) + | 58 sizeof(MINIDUMP_LOCATION_DESCRIPTOR) + |
71 sizeof(MinidumpModuleCrashpadInfo), | 59 sizeof(MinidumpModuleCrashpadInfo), |
72 file_writer.string().size()); | 60 file_writer.string().size()); |
73 | 61 |
74 const MinidumpModuleCrashpadInfoList* module_list = | 62 const MinidumpModuleCrashpadInfoList* module_list = |
75 MinidumpModuleCrashpadInfoListAtStart(file_writer.string(), 1); | 63 MinidumpLocationDescriptorListAtStart(file_writer.string(), 1); |
76 ASSERT_TRUE(module_list); | 64 ASSERT_TRUE(module_list); |
77 | 65 |
78 ASSERT_EQ(1u, module_list->count); | |
79 | |
80 const MinidumpModuleCrashpadInfo* module = | 66 const MinidumpModuleCrashpadInfo* module = |
81 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( | 67 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( |
82 file_writer.string(), module_list->modules[0]); | 68 file_writer.string(), module_list->children[0]); |
83 ASSERT_TRUE(module); | 69 ASSERT_TRUE(module); |
84 | 70 |
85 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module->version); | 71 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module->version); |
86 EXPECT_EQ(0u, module->minidump_module_list_index); | 72 EXPECT_EQ(0u, module->minidump_module_list_index); |
87 EXPECT_EQ(0u, module->simple_annotations.DataSize); | 73 EXPECT_EQ(0u, module->simple_annotations.DataSize); |
88 EXPECT_EQ(0u, module->simple_annotations.Rva); | 74 EXPECT_EQ(0u, module->simple_annotations.Rva); |
89 } | 75 } |
90 | 76 |
91 TEST(MinidumpModuleCrashpadInfoWriter, FullModule) { | 77 TEST(MinidumpModuleCrashpadInfoWriter, FullModule) { |
92 const uint32_t kMinidumpModuleListIndex = 1; | 78 const uint32_t kMinidumpModuleListIndex = 1; |
(...skipping 22 matching lines...) Expand all Loading... |
115 ASSERT_EQ(sizeof(MinidumpModuleCrashpadInfoList) + | 101 ASSERT_EQ(sizeof(MinidumpModuleCrashpadInfoList) + |
116 sizeof(MINIDUMP_LOCATION_DESCRIPTOR) + | 102 sizeof(MINIDUMP_LOCATION_DESCRIPTOR) + |
117 sizeof(MinidumpModuleCrashpadInfo) + | 103 sizeof(MinidumpModuleCrashpadInfo) + |
118 sizeof(MinidumpSimpleStringDictionary) + | 104 sizeof(MinidumpSimpleStringDictionary) + |
119 sizeof(MinidumpSimpleStringDictionaryEntry) + | 105 sizeof(MinidumpSimpleStringDictionaryEntry) + |
120 sizeof(MinidumpUTF8String) + arraysize(kKey) + | 106 sizeof(MinidumpUTF8String) + arraysize(kKey) + |
121 sizeof(MinidumpUTF8String) + arraysize(kValue), | 107 sizeof(MinidumpUTF8String) + arraysize(kValue), |
122 file_writer.string().size()); | 108 file_writer.string().size()); |
123 | 109 |
124 const MinidumpModuleCrashpadInfoList* module_list = | 110 const MinidumpModuleCrashpadInfoList* module_list = |
125 MinidumpModuleCrashpadInfoListAtStart(file_writer.string(), 1); | 111 MinidumpLocationDescriptorListAtStart(file_writer.string(), 1); |
126 ASSERT_TRUE(module_list); | 112 ASSERT_TRUE(module_list); |
127 | 113 |
128 ASSERT_EQ(1u, module_list->count); | |
129 | |
130 const MinidumpModuleCrashpadInfo* module = | 114 const MinidumpModuleCrashpadInfo* module = |
131 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( | 115 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( |
132 file_writer.string(), module_list->modules[0]); | 116 file_writer.string(), module_list->children[0]); |
133 ASSERT_TRUE(module); | 117 ASSERT_TRUE(module); |
134 | 118 |
135 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module->version); | 119 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module->version); |
136 EXPECT_EQ(kMinidumpModuleListIndex, module->minidump_module_list_index); | 120 EXPECT_EQ(kMinidumpModuleListIndex, module->minidump_module_list_index); |
137 EXPECT_NE(0u, module->simple_annotations.DataSize); | 121 EXPECT_NE(0u, module->simple_annotations.DataSize); |
138 EXPECT_NE(0u, module->simple_annotations.Rva); | 122 EXPECT_NE(0u, module->simple_annotations.Rva); |
139 | 123 |
140 const MinidumpSimpleStringDictionary* simple_annotations = | 124 const MinidumpSimpleStringDictionary* simple_annotations = |
141 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( | 125 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( |
142 file_writer.string(), module->simple_annotations); | 126 file_writer.string(), module->simple_annotations); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 simple_string_dictionary_writer_2->AddEntry( | 187 simple_string_dictionary_writer_2->AddEntry( |
204 simple_string_dictionary_entry_writer_2b.Pass()); | 188 simple_string_dictionary_entry_writer_2b.Pass()); |
205 module_writer_2->SetSimpleAnnotations( | 189 module_writer_2->SetSimpleAnnotations( |
206 simple_string_dictionary_writer_2.Pass()); | 190 simple_string_dictionary_writer_2.Pass()); |
207 EXPECT_TRUE(module_writer_2->IsUseful()); | 191 EXPECT_TRUE(module_writer_2->IsUseful()); |
208 module_list_writer.AddModule(module_writer_2.Pass()); | 192 module_list_writer.AddModule(module_writer_2.Pass()); |
209 | 193 |
210 EXPECT_TRUE(module_list_writer.WriteEverything(&file_writer)); | 194 EXPECT_TRUE(module_list_writer.WriteEverything(&file_writer)); |
211 | 195 |
212 const MinidumpModuleCrashpadInfoList* module_list = | 196 const MinidumpModuleCrashpadInfoList* module_list = |
213 MinidumpModuleCrashpadInfoListAtStart(file_writer.string(), 3); | 197 MinidumpLocationDescriptorListAtStart(file_writer.string(), 3); |
214 ASSERT_TRUE(module_list); | 198 ASSERT_TRUE(module_list); |
215 | 199 |
216 ASSERT_EQ(3u, module_list->count); | |
217 | |
218 const MinidumpModuleCrashpadInfo* module_0 = | 200 const MinidumpModuleCrashpadInfo* module_0 = |
219 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( | 201 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( |
220 file_writer.string(), module_list->modules[0]); | 202 file_writer.string(), module_list->children[0]); |
221 ASSERT_TRUE(module_0); | 203 ASSERT_TRUE(module_0); |
222 | 204 |
223 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module_0->version); | 205 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module_0->version); |
224 EXPECT_EQ(kMinidumpModuleListIndex0, module_0->minidump_module_list_index); | 206 EXPECT_EQ(kMinidumpModuleListIndex0, module_0->minidump_module_list_index); |
225 | 207 |
226 const MinidumpSimpleStringDictionary* simple_annotations_0 = | 208 const MinidumpSimpleStringDictionary* simple_annotations_0 = |
227 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( | 209 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( |
228 file_writer.string(), module_0->simple_annotations); | 210 file_writer.string(), module_0->simple_annotations); |
229 ASSERT_TRUE(simple_annotations_0); | 211 ASSERT_TRUE(simple_annotations_0); |
230 | 212 |
231 ASSERT_EQ(1u, simple_annotations_0->count); | 213 ASSERT_EQ(1u, simple_annotations_0->count); |
232 EXPECT_EQ(kKey0, | 214 EXPECT_EQ(kKey0, |
233 MinidumpUTF8StringAtRVAAsString( | 215 MinidumpUTF8StringAtRVAAsString( |
234 file_writer.string(), simple_annotations_0->entries[0].key)); | 216 file_writer.string(), simple_annotations_0->entries[0].key)); |
235 EXPECT_EQ(kValue0, | 217 EXPECT_EQ(kValue0, |
236 MinidumpUTF8StringAtRVAAsString( | 218 MinidumpUTF8StringAtRVAAsString( |
237 file_writer.string(), simple_annotations_0->entries[0].value)); | 219 file_writer.string(), simple_annotations_0->entries[0].value)); |
238 | 220 |
239 const MinidumpModuleCrashpadInfo* module_1 = | 221 const MinidumpModuleCrashpadInfo* module_1 = |
240 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( | 222 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( |
241 file_writer.string(), module_list->modules[1]); | 223 file_writer.string(), module_list->children[1]); |
242 ASSERT_TRUE(module_1); | 224 ASSERT_TRUE(module_1); |
243 | 225 |
244 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module_1->version); | 226 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module_1->version); |
245 EXPECT_EQ(kMinidumpModuleListIndex1, module_1->minidump_module_list_index); | 227 EXPECT_EQ(kMinidumpModuleListIndex1, module_1->minidump_module_list_index); |
246 | 228 |
247 const MinidumpSimpleStringDictionary* simple_annotations_1 = | 229 const MinidumpSimpleStringDictionary* simple_annotations_1 = |
248 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( | 230 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( |
249 file_writer.string(), module_1->simple_annotations); | 231 file_writer.string(), module_1->simple_annotations); |
250 EXPECT_FALSE(simple_annotations_1); | 232 EXPECT_FALSE(simple_annotations_1); |
251 | 233 |
252 const MinidumpModuleCrashpadInfo* module_2 = | 234 const MinidumpModuleCrashpadInfo* module_2 = |
253 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( | 235 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( |
254 file_writer.string(), module_list->modules[2]); | 236 file_writer.string(), module_list->children[2]); |
255 ASSERT_TRUE(module_2); | 237 ASSERT_TRUE(module_2); |
256 | 238 |
257 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module_2->version); | 239 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module_2->version); |
258 EXPECT_EQ(kMinidumpModuleListIndex2, module_2->minidump_module_list_index); | 240 EXPECT_EQ(kMinidumpModuleListIndex2, module_2->minidump_module_list_index); |
259 | 241 |
260 const MinidumpSimpleStringDictionary* simple_annotations_2 = | 242 const MinidumpSimpleStringDictionary* simple_annotations_2 = |
261 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( | 243 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( |
262 file_writer.string(), module_2->simple_annotations); | 244 file_writer.string(), module_2->simple_annotations); |
263 ASSERT_TRUE(simple_annotations_2); | 245 ASSERT_TRUE(simple_annotations_2); |
264 | 246 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 module_snapshot_2.SetAnnotationsSimpleMap(annotations_simple_map_2); | 287 module_snapshot_2.SetAnnotationsSimpleMap(annotations_simple_map_2); |
306 module_snapshots.push_back(&module_snapshot_2); | 288 module_snapshots.push_back(&module_snapshot_2); |
307 | 289 |
308 MinidumpModuleCrashpadInfoListWriter module_list_writer; | 290 MinidumpModuleCrashpadInfoListWriter module_list_writer; |
309 module_list_writer.InitializeFromSnapshot(module_snapshots); | 291 module_list_writer.InitializeFromSnapshot(module_snapshots); |
310 | 292 |
311 StringFileWriter file_writer; | 293 StringFileWriter file_writer; |
312 ASSERT_TRUE(module_list_writer.WriteEverything(&file_writer)); | 294 ASSERT_TRUE(module_list_writer.WriteEverything(&file_writer)); |
313 | 295 |
314 const MinidumpModuleCrashpadInfoList* module_list = | 296 const MinidumpModuleCrashpadInfoList* module_list = |
315 MinidumpModuleCrashpadInfoListAtStart(file_writer.string(), 2); | 297 MinidumpLocationDescriptorListAtStart(file_writer.string(), 2); |
316 ASSERT_TRUE(module_list); | 298 ASSERT_TRUE(module_list); |
317 | 299 |
318 ASSERT_EQ(2u, module_list->count); | |
319 | |
320 const MinidumpModuleCrashpadInfo* module_0 = | 300 const MinidumpModuleCrashpadInfo* module_0 = |
321 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( | 301 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( |
322 file_writer.string(), module_list->modules[0]); | 302 file_writer.string(), module_list->children[0]); |
323 ASSERT_TRUE(module_0); | 303 ASSERT_TRUE(module_0); |
324 | 304 |
325 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module_0->version); | 305 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module_0->version); |
326 EXPECT_EQ(0u, module_0->minidump_module_list_index); | 306 EXPECT_EQ(0u, module_0->minidump_module_list_index); |
327 | 307 |
328 const MinidumpSimpleStringDictionary* simple_annotations_0 = | 308 const MinidumpSimpleStringDictionary* simple_annotations_0 = |
329 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( | 309 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( |
330 file_writer.string(), module_0->simple_annotations); | 310 file_writer.string(), module_0->simple_annotations); |
331 ASSERT_TRUE(simple_annotations_0); | 311 ASSERT_TRUE(simple_annotations_0); |
332 | 312 |
333 ASSERT_EQ(annotations_simple_map_0.size(), simple_annotations_0->count); | 313 ASSERT_EQ(annotations_simple_map_0.size(), simple_annotations_0->count); |
334 EXPECT_EQ(kKey0B, | 314 EXPECT_EQ(kKey0B, |
335 MinidumpUTF8StringAtRVAAsString( | 315 MinidumpUTF8StringAtRVAAsString( |
336 file_writer.string(), simple_annotations_0->entries[0].key)); | 316 file_writer.string(), simple_annotations_0->entries[0].key)); |
337 EXPECT_EQ(kValue0B, | 317 EXPECT_EQ(kValue0B, |
338 MinidumpUTF8StringAtRVAAsString( | 318 MinidumpUTF8StringAtRVAAsString( |
339 file_writer.string(), simple_annotations_0->entries[0].value)); | 319 file_writer.string(), simple_annotations_0->entries[0].value)); |
340 EXPECT_EQ(kKey0A, | 320 EXPECT_EQ(kKey0A, |
341 MinidumpUTF8StringAtRVAAsString( | 321 MinidumpUTF8StringAtRVAAsString( |
342 file_writer.string(), simple_annotations_0->entries[1].key)); | 322 file_writer.string(), simple_annotations_0->entries[1].key)); |
343 EXPECT_EQ(kValue0A, | 323 EXPECT_EQ(kValue0A, |
344 MinidumpUTF8StringAtRVAAsString( | 324 MinidumpUTF8StringAtRVAAsString( |
345 file_writer.string(), simple_annotations_0->entries[1].value)); | 325 file_writer.string(), simple_annotations_0->entries[1].value)); |
346 | 326 |
347 const MinidumpModuleCrashpadInfo* module_2 = | 327 const MinidumpModuleCrashpadInfo* module_2 = |
348 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( | 328 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfo>( |
349 file_writer.string(), module_list->modules[1]); | 329 file_writer.string(), module_list->children[1]); |
350 ASSERT_TRUE(module_2); | 330 ASSERT_TRUE(module_2); |
351 | 331 |
352 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module_2->version); | 332 EXPECT_EQ(MinidumpModuleCrashpadInfo::kVersion, module_2->version); |
353 EXPECT_EQ(2u, module_2->minidump_module_list_index); | 333 EXPECT_EQ(2u, module_2->minidump_module_list_index); |
354 | 334 |
355 const MinidumpSimpleStringDictionary* simple_annotations_2 = | 335 const MinidumpSimpleStringDictionary* simple_annotations_2 = |
356 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( | 336 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( |
357 file_writer.string(), module_2->simple_annotations); | 337 file_writer.string(), module_2->simple_annotations); |
358 ASSERT_TRUE(simple_annotations_2); | 338 ASSERT_TRUE(simple_annotations_2); |
359 | 339 |
360 ASSERT_EQ(annotations_simple_map_2.size(), simple_annotations_2->count); | 340 ASSERT_EQ(annotations_simple_map_2.size(), simple_annotations_2->count); |
361 EXPECT_EQ(kKey2, | 341 EXPECT_EQ(kKey2, |
362 MinidumpUTF8StringAtRVAAsString( | 342 MinidumpUTF8StringAtRVAAsString( |
363 file_writer.string(), simple_annotations_2->entries[0].key)); | 343 file_writer.string(), simple_annotations_2->entries[0].key)); |
364 EXPECT_EQ(kValue2, | 344 EXPECT_EQ(kValue2, |
365 MinidumpUTF8StringAtRVAAsString( | 345 MinidumpUTF8StringAtRVAAsString( |
366 file_writer.string(), simple_annotations_2->entries[0].value)); | 346 file_writer.string(), simple_annotations_2->entries[0].value)); |
367 } | 347 } |
368 | 348 |
369 } // namespace | 349 } // namespace |
370 } // namespace test | 350 } // namespace test |
371 } // namespace crashpad | 351 } // namespace crashpad |
OLD | NEW |