Add PInvoke/ExactSpelling tests (dotnet/coreclr#19303)
authorZeng Jiang <v-jiazen@microsoft.com>
Fri, 19 Oct 2018 17:07:59 +0000 (01:07 +0800)
committerJeremy Koritzinsky <jkoritzinsky@gmail.com>
Fri, 19 Oct 2018 17:07:59 +0000 (10:07 -0700)
commitd7c2c49054d4f367ae3569a4d701f6e70f72fb87
treeee5502e5e63ee3ad760ee5c7e7a31dc4d39a7aee
parent5fc2104aa0079515678ffa8845b84f62661b5dc6
Add PInvoke/ExactSpelling tests (dotnet/coreclr#19303)

* Add PInvoke/ExactSpelling tests

Refactor tests to fit with the rest of the Interop tests.

Fix up test to cleanly run.

Change CMakeLists.txt to match the rest of the tests.

Include Interop.cmake in CMakeLists.txt

Remove Service.

* On x86 enable stdcall mangling irrespective of ExactSpelling and account for the charset suffix when ExactSpelling = false.

Change variable name.

Clean up the FindEntryPoint. The logic flow now matches CoreRT + CoreCLR specific features (ordinals and stdcall mangling).

PR Feedback.

Fix format specifier.

Add back probing null check.

Fix offset calculation for stdcall mangling.

Probe the stdcall-mangled versions of the original entry-point names when ExactSpelling isn't set.

Cleanup.

Commit migrated from https://github.com/dotnet/coreclr/commit/f56dc8e76dc4bdf66b1f4376a9b8d0fc107c5926
src/coreclr/src/vm/method.cpp
src/coreclr/src/vm/method.hpp
src/coreclr/tests/src/Interop/CMakeLists.txt
src/coreclr/tests/src/Interop/PInvoke/ExactSpelling/CMakeLists.txt [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/ExactSpelling/ExactSpellingNative.cpp [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/ExactSpelling/ExactSpellingTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/ExactSpelling/ExactSpellingTest.csproj [new file with mode: 0644]