From 2fcf278b141e61ef3ae4c9afa9e3dc1ea9954bb0 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Mon, 18 Mar 2019 18:01:29 -0700 Subject: [PATCH] Fix Interop/SizeConst/SizeConstTest to successfully run in all locales. (#20268) This test initially would fail when run on a multibyte character set with characters for the original value of `s.arr` such as zh-CH. We cannot change the marshaler since there is not a good way to determine how many bytes/character we need at type-load-time (when the size of the native type is determined). This change allows us to accurately run this test on Windows machines with multi-byte character sets. Fixes #7793. --- tests/src/Interop/SizeConst/SizeConstTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/Interop/SizeConst/SizeConstTest.cs b/tests/src/Interop/SizeConst/SizeConstTest.cs index a4d85c8..b4b9055 100644 --- a/tests/src/Interop/SizeConst/SizeConstTest.cs +++ b/tests/src/Interop/SizeConst/SizeConstTest.cs @@ -26,7 +26,7 @@ class Test { // always marshal managedArray.Length S_CHARArray_ByValTStr s = new S_CHARArray_ByValTStr(); - s.arr = "有个可爱"; + s.arr = "abcd"; TakeByValTStr(s, s.arr.Length); // off by one byte since sizeconst == 4 and -- 2.7.4