OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "base/pe_image.h" | 8 #include "base/pe_image.h" |
9 #include "base/win_util.h" | 9 #include "base/win_util.h" |
10 | 10 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 EXPECT_TRUE(pe.GetProcOrdinal("RegEnumKeyExW", &ordinal)); | 196 EXPECT_TRUE(pe.GetProcOrdinal("RegEnumKeyExW", &ordinal)); |
197 | 197 |
198 FARPROC address1 = pe.GetProcAddress("RegEnumKeyExW"); | 198 FARPROC address1 = pe.GetProcAddress("RegEnumKeyExW"); |
199 FARPROC address2 = pe.GetProcAddress(reinterpret_cast<char*>(ordinal)); | 199 FARPROC address2 = pe.GetProcAddress(reinterpret_cast<char*>(ordinal)); |
200 EXPECT_TRUE(address1 != NULL); | 200 EXPECT_TRUE(address1 != NULL); |
201 EXPECT_TRUE(address2 != NULL); | 201 EXPECT_TRUE(address2 != NULL); |
202 EXPECT_TRUE(address1 == address2); | 202 EXPECT_TRUE(address1 == address2); |
203 | 203 |
204 FreeLibrary(module); | 204 FreeLibrary(module); |
205 } | 205 } |
206 | |
OLD | NEW |