Add more advanced SafeArray tests (dotnet/coreclr#21063)
authorJeremy Koritzinsky <jkoritzinsky@gmail.com>
Thu, 29 Nov 2018 19:57:36 +0000 (11:57 -0800)
committerGitHub <noreply@github.com>
Thu, 29 Nov 2018 19:57:36 +0000 (11:57 -0800)
commit3eac0693fab69a4b02f7d61dd474c37798f65608
treec54f67c32fc13fc83c4d17cd2ff13a2dc8511dc6
parente6328a99cbbdd77dac01094c53d0c14ffdaacac1
Add more advanced SafeArray tests (dotnet/coreclr#21063)

* Port simple SafeArray tests over from .NET Framework's test suite.

* Clean up native calling conventions.

* Add basic field array -> field SAFEARRAY* tests.

* Fix some hiding stdcall calling convention decorators.

* PR Feedback.

* Rewrite native part of SafeArray tests

* Wrote the managed side of the tests. Non-passing ones are currently commented out.

* Fix up tests and enable marshalling a string[] as a SAFEARRAY of LPSTR or LPWSTR.

* Add blittable records test with a return parameter.

* Add returning non-blittable record safearray test.

* Fix which typedef we're using

* Clean up

* Fix/cleanup RecordNative

* Replace "" with <> for platformdefines.h include.

* Use macro for calling convention.

* PR Feedback.

* Remove residual "Helpers.h" include.

* Fix remaining incorrect calling conventions.

* One more calling convention fix.

Commit migrated from https://github.com/dotnet/coreclr/commit/93d3f4c1f7f8a27c94aad68837dc8dda30c19b02
17 files changed:
src/coreclr/src/vm/olevariant.cpp
src/coreclr/tests/src/Common/Platform/platformdefines.cpp
src/coreclr/tests/src/Common/Platform/platformdefines.h
src/coreclr/tests/src/Exceptions/ForeignThread/ForeignThreadExceptionsNative.cpp
src/coreclr/tests/src/Interop/ArrayMarshalling/ByValArray/MarshalArrayByValNative.cpp
src/coreclr/tests/src/Interop/ArrayMarshalling/SafeArray/CMakeLists.txt [new file with mode: 0644]
src/coreclr/tests/src/Interop/ArrayMarshalling/SafeArray/RecordNative.cpp [new file with mode: 0644]
src/coreclr/tests/src/Interop/ArrayMarshalling/SafeArray/SafeArrayNative.cpp [new file with mode: 0644]
src/coreclr/tests/src/Interop/ArrayMarshalling/SafeArray/SafeArrayTest.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/ArrayMarshalling/SafeArray/SafeArrayTest.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/CMakeLists.txt
src/coreclr/tests/src/Interop/FuncPtrAsDelegateParam/FuncPtrAsDelegateParamNative.cpp
src/coreclr/tests/src/Interop/SimpleStruct/SimpleStructNative.cpp
src/coreclr/tests/src/Interop/StringMarshalling/BSTR/BSTRTestNative.cpp
src/coreclr/tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h
src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalExpStruct/ExpStructAsParamNative.h
src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.cpp