Add PInvoke/SafeHandles tests (#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)
commitc1ae5a5600247cbe9790e40cd127363c43a17b35
treec74e51abc57729681dedede74d92d10b351ba819
parent40a9c22c59c850834c6a60f830b44809dbe6cff9
Add PInvoke/SafeHandles tests (#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.
29 files changed:
tests/src/Interop/CMakeLists.txt
tests/src/Interop/PInvoke/SafeHandles/AbstractDerived/AbstractDerivedTest.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/AbstractDerived/AbstractDerivedTest.csproj [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/CMakeLists.txt [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/CleanUpCheck/CleanUpCheckTest.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/CleanUpCheck/CleanUpCheckTest.csproj [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Default/DefaultTest.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Default/DefaultTest.csproj [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Helper.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Interface/CMakeLists.txt [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Interface/InterfaceNative.cpp [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Interface/InterfaceTest.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Interface/InterfaceTest.csproj [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/InvalidMarshalAs/InvalidMarshalAsTest.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/InvalidMarshalAs/InvalidMarshalAsTest.csproj [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Misc.Unsupported/MiscUnsupportedTest.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Misc.Unsupported/MiscUnsupportedTest.csproj [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Misc/MiscTest.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/Misc/MiscTest.csproj [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/ReleaseHandle/CMakeLists.txt [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/ReleaseHandle/ReleaseHandleNative.cpp [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/ReleaseHandle/ReleaseHandleTest.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/ReleaseHandle/ReleaseHandleTest.csproj [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/SafeFileHandle.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/SafeHandleNative.cpp [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/SigDiff/SigDiffTest.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/SigDiff/SigDiffTest.csproj [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/StructDefs.cs [new file with mode: 0644]
tests/src/Interop/PInvoke/SafeHandles/StructDefs.h [new file with mode: 0644]