Add tests for ANSI BSTRs (#20985)
authorJeremy Koritzinsky <jkoritzinsky@gmail.com>
Thu, 15 Nov 2018 22:50:00 +0000 (14:50 -0800)
committerGitHub <noreply@github.com>
Thu, 15 Nov 2018 22:50:00 +0000 (14:50 -0800)
commit97b25b3f1e66b31fbc9f42e8b65aec64710be085
treed8df056efe4a1199a1a183ad5f36f48b5e80363f
parent20bae279e5decb3e6fecef01e64284e47f930f8b
Add tests for ANSI BSTRs (#20985)

* Add tests for ANSI BSTRs

* Fix signed/unsigned mismatch in comparisons. Add xplatform include

* Use regular memcpy

* Enable ANSI BSTR off-windows.

* Also enable UnmanagedType.TBStr off-Windows since both BStr variants are available off-Windows.

* Make sure the AnsiBSTR marshaller is hooked up off-Windows.

* Remove a few more ifdefs I missed.

* remove ifdefs around binder definitions and the C# stub helpers.

* PR Feedback.

* Add xplat ARRAYSIZE macro

* Move xplat ARRAYSIZE to platformdefines.h
14 files changed:
src/System.Private.CoreLib/src/System/StubHelpers.cs
src/vm/ilmarshalers.cpp
src/vm/ilmarshalers.h
src/vm/mlinfo.cpp
src/vm/mscorlib.h
src/vm/mtypes.h
tests/src/Common/Platform/platformdefines.h
tests/src/Interop/CMakeLists.txt
tests/src/Interop/StringMarshalling/AnsiBSTR/AnsiBStrTest.cs [new file with mode: 0644]
tests/src/Interop/StringMarshalling/AnsiBSTR/AnsiBStrTest.csproj [new file with mode: 0644]
tests/src/Interop/StringMarshalling/AnsiBSTR/AnsiBStrTestNative.cpp [new file with mode: 0644]
tests/src/Interop/StringMarshalling/AnsiBSTR/CMakeLists.txt [new file with mode: 0644]
tests/src/Interop/StringMarshalling/AnsiBSTR/PinvokeDef.cs [new file with mode: 0644]
tests/src/Interop/common/xplatform.h