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 7a6ff3c..bf20917 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,