From: Tarek Mahmoud Sayed Date: Sun, 16 Jun 2019 19:38:38 +0000 (+0100) Subject: Fix the failure in RegionInfo Tests (dotnet/corefx#38577) X-Git-Tag: submit/tizen/20210909.063632~11031^2~1271 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=825d2e3f8113ad6c63c85ab2c60838a34dc52ee0;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix the failure in RegionInfo Tests (dotnet/corefx#38577) * Fix the failure in RegionInfo Tests China region name has changed to "China mainland", we are updating the test to accept this new name too. Commit migrated from https://github.com/dotnet/corefx/commit/d3b6b4aff1dd10afdc83ecfd01ee462737693077 --- diff --git a/src/libraries/System.Globalization/tests/System/Globalization/RegionInfoTests.cs b/src/libraries/System.Globalization/tests/System/Globalization/RegionInfoTests.cs index 9586135..cb6e48e 100644 --- a/src/libraries/System.Globalization/tests/System/Globalization/RegionInfoTests.cs +++ b/src/libraries/System.Globalization/tests/System/Globalization/RegionInfoTests.cs @@ -91,12 +91,12 @@ namespace System.Globalization.Tests [Theory] [InlineData("en-US", new string[] { "United States" })] [InlineData("US", new string[] { "United States" })] - [InlineData("zh-CN", new string[] { "China", "People's Republic of China" })] - [InlineData("CN", new string[] { "China", "People's Republic of China" })] + [InlineData("zh-CN", new string[] { "China", "People's Republic of China", "China mainland" })] + [InlineData("CN", new string[] { "China", "People's Republic of China", "China mainland" })] public void EnglishName(string name, string[] expected) { string result = new RegionInfo(name).EnglishName; - Assert.True(expected.Contains(result)); + Assert.True(expected.Contains(result), $"RegionInfo.EnglishName({name})='{result}' not found in the possible names ({String.Join(", ", expected)}) "); } [Theory]