OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 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 24 matching lines...) Expand all Loading... |
35 GetCurrentProcess(), self, &module_info, sizeof(module_info))); | 35 GetCurrentProcess(), self, &module_info, sizeof(module_info))); |
36 EXPECT_EQ(self, module_info.lpBaseOfDll); | 36 EXPECT_EQ(self, module_info.lpBaseOfDll); |
37 EXPECT_TRUE(pe_image_reader.Initialize(&process_reader, | 37 EXPECT_TRUE(pe_image_reader.Initialize(&process_reader, |
38 reinterpret_cast<WinVMAddress>(self), | 38 reinterpret_cast<WinVMAddress>(self), |
39 module_info.SizeOfImage, | 39 module_info.SizeOfImage, |
40 "self")); | 40 "self")); |
41 UUID uuid; | 41 UUID uuid; |
42 DWORD age; | 42 DWORD age; |
43 std::string pdbname; | 43 std::string pdbname; |
44 EXPECT_TRUE(pe_image_reader.DebugDirectoryInformation(&uuid, &age, &pdbname)); | 44 EXPECT_TRUE(pe_image_reader.DebugDirectoryInformation(&uuid, &age, &pdbname)); |
45 EXPECT_NE(-1, pdbname.find("crashpad_snapshot_test")); | 45 EXPECT_NE(std::string::npos, pdbname.find("crashpad_snapshot_test")); |
46 const std::string suffix(".pdb"); | 46 const std::string suffix(".pdb"); |
47 EXPECT_EQ( | 47 EXPECT_EQ( |
48 0, | 48 0, |
49 pdbname.compare(pdbname.size() - suffix.size(), suffix.size(), suffix)); | 49 pdbname.compare(pdbname.size() - suffix.size(), suffix.size(), suffix)); |
50 } | 50 } |
51 | 51 |
52 } // namespace | 52 } // namespace |
53 } // namespace test | 53 } // namespace test |
54 } // namespace crashpad | 54 } // namespace crashpad |
OLD | NEW |