Fix invalid tests for COM native server (#21012)
authorAaron Robinson <arobins@microsoft.com>
Thu, 15 Nov 2018 02:54:12 +0000 (18:54 -0800)
committerGitHub <noreply@github.com>
Thu, 15 Nov 2018 02:54:12 +0000 (18:54 -0800)
tests/src/Interop/COM/NativeServer/StringTesting.h

index 7a6ff3c9897973fb6c7b7be269aa637a99d0c452..bf209171d042d1dc160ea88bf2fa05edee1c18c3 100644 (file)
@@ -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,