From: Jeremy Koritzinsky Date: Mon, 7 Jan 2019 22:11:12 +0000 (-0800) Subject: Fix CharSet on StringBuilder hidden null terminator test (#21853) X-Git-Tag: accepted/tizen/unified/20190422.045933~170 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fee8d6ad6fc27073f88755dbc066d1aea8da5517;p=platform%2Fupstream%2Fcoreclr.git Fix CharSet on StringBuilder hidden null terminator test (#21853) --- diff --git a/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestPInvokeDef.cs b/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestPInvokeDef.cs index d8648df..88c3e74 100644 --- a/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestPInvokeDef.cs +++ b/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestPInvokeDef.cs @@ -63,10 +63,10 @@ namespace NativeDefs [DllImport(NativeBinaryName)] public static extern bool ReverseP_MarshalStrB_InOut(Del_MarshalStrB_InOut d, [MarshalAs(UnmanagedType.LPTStr)]string s); - [DllImport(NativeBinaryName)] + [DllImport(NativeBinaryName, CharSet = CharSet.Unicode)] public static extern bool Verify_NullTerminators_PastEnd(StringBuilder builder, int length); - [DllImport(NativeBinaryName, EntryPoint = "Verify_NullTerminators_PastEnd")] + [DllImport(NativeBinaryName, EntryPoint = "Verify_NullTerminators_PastEnd", CharSet = CharSet.Unicode)] public static extern bool Verify_NullTerminators_PastEnd_Out([Out] StringBuilder builder, int length); } }