Add PInvoke/SafeHandles tests (dotnet/coreclr#19330)
authorZeng Jiang <v-jiazen@microsoft.com>
Fri, 16 Nov 2018 01:49:41 +0000 (09:49 +0800)
committerJeremy Koritzinsky <jkoritzinsky@gmail.com>
Fri, 16 Nov 2018 01:49:41 +0000 (17:49 -0800)
commit27d4908190204add5aeb6cba45f1ed0f204fec12
tree80078851bcf9d219b180b96030dc9bf6a82be505
parent9db1dc889fcafc6a574bea9cf7f02093459f5cae
Add PInvoke/SafeHandles tests (dotnet/coreclr#19330)

* Add PInvoke/SafeHandles tests

* Fix compile warnings - include header file with relative path

* Run SafeHandle tests only on Windows. The tests are very Windows-centric, so we'd have to do quite a bit of a re-write to get them working xplat.

* Fix CMake project references.

* Fix interface CMakeLists project reference.

* Add casts for string literals.

* Use LPOLESTR and the W macro instead of OLECHAR* cast and L prefix.

Commit migrated from https://github.com/dotnet/coreclr/commit/c1ae5a5600247cbe9790e40cd127363c43a17b35
29 files changed:
src/coreclr/tests/src/Interop/CMakeLists.txt
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/AbstractDerived/AbstractDerivedTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/AbstractDerived/AbstractDerivedTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/CMakeLists.txt [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/CleanUpCheck/CleanUpCheckTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/CleanUpCheck/CleanUpCheckTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Default/DefaultTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Default/DefaultTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Helper.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Interface/CMakeLists.txt [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Interface/InterfaceNative.cpp [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Interface/InterfaceTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Interface/InterfaceTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/InvalidMarshalAs/InvalidMarshalAsTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/InvalidMarshalAs/InvalidMarshalAsTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Misc.Unsupported/MiscUnsupportedTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Misc.Unsupported/MiscUnsupportedTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Misc/MiscTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/Misc/MiscTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/ReleaseHandle/CMakeLists.txt [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/ReleaseHandle/ReleaseHandleNative.cpp [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/ReleaseHandle/ReleaseHandleTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/ReleaseHandle/ReleaseHandleTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/SafeFileHandle.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/SafeHandleNative.cpp [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/SigDiff/SigDiffTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/SigDiff/SigDiffTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/StructDefs.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/SafeHandles/StructDefs.h [new file with mode: 0644]