OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file contains unit tests for PEImage. | 5 // This file contains unit tests for PEImage. |
6 #include <algorithm> | 6 #include <algorithm> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/win/pe_image.h" | 11 #include "base/win/pe_image.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/googletest/include/gtest/gtest.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 namespace win { | 15 namespace win { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // Just counts the number of invocations. | 19 // Just counts the number of invocations. |
20 bool ImportsCallback(const PEImage& image, | 20 bool ImportsCallback(const PEImage& image, |
21 LPCSTR module, | 21 LPCSTR module, |
22 DWORD ordinal, | 22 DWORD ordinal, |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 EXPECT_TRUE(pe.GetDebugId(&guid, &age)); | 184 EXPECT_TRUE(pe.GetDebugId(&guid, &age)); |
185 | 185 |
186 GUID empty_guid = {0}; | 186 GUID empty_guid = {0}; |
187 EXPECT_TRUE(!IsEqualGUID(empty_guid, guid)); | 187 EXPECT_TRUE(!IsEqualGUID(empty_guid, guid)); |
188 EXPECT_NE(0U, age); | 188 EXPECT_NE(0U, age); |
189 FreeLibrary(module); | 189 FreeLibrary(module); |
190 } | 190 } |
191 | 191 |
192 } // namespace win | 192 } // namespace win |
193 } // namespace base | 193 } // namespace base |
OLD | NEW |