From 95696f7cfba5a9c2f91e537fc7652011804b650a Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Wed, 14 Nov 2018 18:54:12 -0800 Subject: [PATCH] Fix invalid tests for COM native server (#21012) --- tests/src/Interop/COM/NativeServer/StringTesting.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/src/Interop/COM/NativeServer/StringTesting.h b/tests/src/Interop/COM/NativeServer/StringTesting.h index 7a6ff3c989..bf209171d0 100644 --- a/tests/src/Interop/COM/NativeServer/StringTesting.h +++ b/tests/src/Interop/COM/NativeServer/StringTesting.h @@ -225,8 +225,11 @@ public: // IStringTesting /*[in]*/ LPWSTR a, /*[out]*/ LPWSTR b) { - ReverseInplace(::wcslen(b), b); - return S_OK; + // Not possible to test from native server + // since the out string is a pointer to the + // actual CLR string and modifying it breaks + // the immutability invariant of CLR strings. + return S_FALSE; } DEF_FUNC(Reverse_SB_LPWStr)( /*[in,out]*/ LPWSTR a, -- 2.34.1