Add more advanced SafeArray tests (#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)
commit93d3f4c1f7f8a27c94aad68837dc8dda30c19b02
tree74ef2bdd3b18e3047a1fd182270710d4ffb0d4be
parent0cc4b0c3e6207fcae9ffde81096f86c40d2634b4
Add more advanced SafeArray tests (#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.
17 files changed:
src/vm/olevariant.cpp
tests/src/Common/Platform/platformdefines.cpp
tests/src/Common/Platform/platformdefines.h
tests/src/Exceptions/ForeignThread/ForeignThreadExceptionsNative.cpp
tests/src/Interop/ArrayMarshalling/ByValArray/MarshalArrayByValNative.cpp
tests/src/Interop/ArrayMarshalling/SafeArray/CMakeLists.txt [new file with mode: 0644]
tests/src/Interop/ArrayMarshalling/SafeArray/RecordNative.cpp [new file with mode: 0644]
tests/src/Interop/ArrayMarshalling/SafeArray/SafeArrayNative.cpp [new file with mode: 0644]
tests/src/Interop/ArrayMarshalling/SafeArray/SafeArrayTest.cs [new file with mode: 0644]
tests/src/Interop/ArrayMarshalling/SafeArray/SafeArrayTest.csproj [new file with mode: 0644]
tests/src/Interop/CMakeLists.txt
tests/src/Interop/FuncPtrAsDelegateParam/FuncPtrAsDelegateParamNative.cpp
tests/src/Interop/SimpleStruct/SimpleStructNative.cpp
tests/src/Interop/StringMarshalling/BSTR/BSTRTestNative.cpp
tests/src/Interop/StructMarshalling/PInvoke/MarshalStructAsParamDLL.h
tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalExpStruct/ExpStructAsParamNative.h
tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.cpp