Add PInvoke/Array tests (dotnet/coreclr#19266)
authorZeng Jiang <v-jiazen@microsoft.com>
Thu, 15 Nov 2018 21:32:25 +0000 (05:32 +0800)
committerJeremy Koritzinsky <jkoritzinsky@gmail.com>
Thu, 15 Nov 2018 21:32:25 +0000 (13:32 -0800)
commit3cac5837501aa9ac83f06b4ed6f546c6d6b76627
treecb3998f1a44d1aabc104210e2b6ac775c068be02
parentd5b6faae57b2d5b1aa7f220ea8d803b6ead92b02
Add PInvoke/Array tests (dotnet/coreclr#19266)

* Add PInvoke/Array tests

* Fix compile warnings

* Get tests passing on Windows again.

* Change error_t type to work xplat.

* Change error_t in types.h as well

* Clean up build slightly.

* PR feedback and native test code refactoring.

* Clean up header.

* Add a xplat implementation of _itoa_s for our tests.

* CHAR -> char

* Make calling convention cdecl to avoid stdcall mangling.

* Make return test native code cdecl as well (missed it before).

* Fix bug in platformdefines _itoa_s

* Return early in TP_itoX_s when num == 0

Commit migrated from https://github.com/dotnet/coreclr/commit/f5a23fe0e3120e449ddce4b9c025305a786a2481
19 files changed:
src/coreclr/tests/src/Common/Platform/platformdefines.cpp
src/coreclr/tests/src/Common/Platform/platformdefines.h
src/coreclr/tests/src/Interop/CMakeLists.txt
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArray.h [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/AsByValArray/AsByValArrayTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/AsByValArray/AsByValArrayTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/AsByValArray/FldDef_DefaultArray.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/AsLPArrayTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/AsLPArrayTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/FldDef_LPArray.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/LPArrayNative/CMakeLists.txt [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsField/LPArrayNative/MarshalArrayByValArrayNative.cpp [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsParam/AsDefault/AsDefaultTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsParam/AsDefault/AsDefaultTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsParam/AsLPArray/AsLPArrayTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsParam/AsLPArray/AsLPArrayTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsParam/LPArrayNative/CMakeLists.txt [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Array/MarshalArrayAsParam/LPArrayNative/MarshalArrayLPArrayNative.cpp [new file with mode: 0644]
src/coreclr/tests/src/Interop/common/types.h