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 "build/build_config.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 namespace win { | 16 namespace win { |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 // Just counts the number of invocations. | 20 // Just counts the number of invocations. |
20 bool ImportsCallback(const PEImage& image, | 21 bool ImportsCallback(const PEImage& image, |
21 LPCSTR module, | 22 LPCSTR module, |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 EXPECT_TRUE(pe.GetDebugId(&guid, &age)); | 185 EXPECT_TRUE(pe.GetDebugId(&guid, &age)); |
185 | 186 |
186 GUID empty_guid = {0}; | 187 GUID empty_guid = {0}; |
187 EXPECT_TRUE(!IsEqualGUID(empty_guid, guid)); | 188 EXPECT_TRUE(!IsEqualGUID(empty_guid, guid)); |
188 EXPECT_NE(0U, age); | 189 EXPECT_NE(0U, age); |
189 FreeLibrary(module); | 190 FreeLibrary(module); |
190 } | 191 } |
191 | 192 |
192 } // namespace win | 193 } // namespace win |
193 } // namespace base | 194 } // namespace base |
OLD | NEW |