Add PInvoke/ExactSpelling tests (#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)
commitf56dc8e76dc4bdf66b1f4376a9b8d0fc107c5926
tree2e49a4214a8c142acb8d6aa925e4ec1fc5996798
parent6091ddbd6e531c82c7a5db015b587b57aa09fbf4
Add PInvoke/ExactSpelling tests (#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.
src/vm/method.cpp
src/vm/method.hpp
tests/src/Interop/CMakeLists.txt
tests/src/Interop/PInvoke/ExactSpelling/CMakeLists.txt [new file with mode: 0644]
tests/src/Interop/PInvoke/ExactSpelling/ExactSpellingNative.cpp [new file with mode: 0644]
tests/src/Interop/PInvoke/ExactSpelling/ExactSpellingTest.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/ExactSpelling/ExactSpellingTest.csproj [new file with mode: 0644]