From ce008e34d8a51d33cbe81eb6a719d3056d4ddba1 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 27 Jul 2021 15:02:13 +0200 Subject: [PATCH] [dotnet] Globalization works for Mac Catalyst now. Fixes #11392. Fixes https://github.com/xamarin/xamarin-macios/issues/11392. --- dotnet/targets/Xamarin.Shared.Sdk.targets | 3 +-- tests/EmbeddedResources/ResourcesTest.cs | 2 -- tests/linker/ios/link all/CalendarTest.cs | 3 --- tests/linker/ios/link sdk/CalendarTest.cs | 3 --- tests/linker/ios/link sdk/LinkSdkRegressionTest.cs | 3 --- tests/linker/ios/link sdk/LocaleTest.cs | 6 ------ tests/monotouch-test/Foundation/LocaleTest.cs | 3 --- 7 files changed, 1 insertion(+), 22 deletions(-) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index d355cd90fbc9..fa932da13252 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -128,8 +128,7 @@ false false false - - true + false false true true diff --git a/tests/EmbeddedResources/ResourcesTest.cs b/tests/EmbeddedResources/ResourcesTest.cs index 24527d8525d7..1a0cb7fc6f8f 100644 --- a/tests/EmbeddedResources/ResourcesTest.cs +++ b/tests/EmbeddedResources/ResourcesTest.cs @@ -41,7 +41,6 @@ public void Embedded () var manager = new ResourceManager ("EmbeddedResources.Welcome", typeof(ResourcesTest).Assembly); #endif -#if !(NET && __MACCATALYST__) // https://github.com/xamarin/xamarin-macios/issues/11392 Assert.AreEqual ("Welcome", manager.GetString ("String1", new CultureInfo ("en")), "en"); Assert.AreEqual ("G'day", manager.GetString ("String1", new CultureInfo ("en-AU")), "en-AU"); Assert.AreEqual ("Willkommen", manager.GetString ("String1", new CultureInfo ("de")), "de"); @@ -49,7 +48,6 @@ public void Embedded () Assert.AreEqual ("Bienvenido", manager.GetString ("String1", new CultureInfo ("es")), "es"); Assert.AreEqual ("Bienvenido", manager.GetString ("String1", new CultureInfo ("es-AR")), "es-AR"); Assert.AreEqual ("Bienvenido", manager.GetString ("String1", new CultureInfo ("es-ES")), "es-ES"); -#endif } } } \ No newline at end of file diff --git a/tests/linker/ios/link all/CalendarTest.cs b/tests/linker/ios/link all/CalendarTest.cs index 9a49494ff152..60943eef5853 100644 --- a/tests/linker/ios/link all/CalendarTest.cs +++ b/tests/linker/ios/link all/CalendarTest.cs @@ -10,9 +10,6 @@ namespace LinkAll.Calendars { [TestFixture] // we want the tests to be available because we use the linker [Preserve (AllMembers = true)] -#if NET && __MACCATALYST__ - [Ignore ("No globalization data yet for Mac Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif public class CalendarTest { // application *MUST* be build with I18N.MidEast and I18N.Other (Thai) diff --git a/tests/linker/ios/link sdk/CalendarTest.cs b/tests/linker/ios/link sdk/CalendarTest.cs index c6bf0d17f4ee..bc9e67bf851e 100644 --- a/tests/linker/ios/link sdk/CalendarTest.cs +++ b/tests/linker/ios/link sdk/CalendarTest.cs @@ -10,9 +10,6 @@ namespace LinkSdk.Calendars { [TestFixture] // we want the tests to be available because we use the linker [Preserve (AllMembers = true)] -#if NET && __MACCATALYST__ - [Ignore ("No globalization data yet for Mac Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif public class CalendarTest { // application must *NOT* be build with I18N.MidEast and I18N.Other (Thai) diff --git a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs index c2de59602ad4..f67c41267af1 100644 --- a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs +++ b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs @@ -468,9 +468,6 @@ public void OpenTk_Preserved () #endif // !__WATCHOS__ && !__MACCATALYST__ [Test] -#if NET && __MACCATALYST__ - [Ignore ("No globalization data yet for Mac Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif public void XElement_3137 () { CultureInfo current = Thread.CurrentThread.CurrentCulture; diff --git a/tests/linker/ios/link sdk/LocaleTest.cs b/tests/linker/ios/link sdk/LocaleTest.cs index b566c5a50904..a1a6e9d0ecd9 100644 --- a/tests/linker/ios/link sdk/LocaleTest.cs +++ b/tests/linker/ios/link sdk/LocaleTest.cs @@ -14,9 +14,6 @@ public class LocaleTest { [Test] [SetCulture ("cs-CZ")] -#if NET && __MACCATALYST__ - [Ignore ("No globalization data yet for Mac Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif public void CzechDictComparer () { DictComparer (); @@ -24,9 +21,6 @@ public void CzechDictComparer () [Test] [SetCulture ("en-US")] -#if NET && __MACCATALYST__ - [Ignore ("No globalization data yet for Mac Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif public void EnglishDictComparer () { DictComparer (); diff --git a/tests/monotouch-test/Foundation/LocaleTest.cs b/tests/monotouch-test/Foundation/LocaleTest.cs index bc9fd07b5860..b3a11a3798b0 100644 --- a/tests/monotouch-test/Foundation/LocaleTest.cs +++ b/tests/monotouch-test/Foundation/LocaleTest.cs @@ -38,9 +38,6 @@ public void FromLocaleIdentifier () Assert.That (NSLocale.FromLocaleIdentifier (ident).Identifier, Is.EqualTo (ident), "FromLocaleIdentifier"); } -#if NET && __MACCATALYST__ - [Ignore ("No globalization for Mac Catalyst yet - https://github.com/xamarin/xamarin-macios/issues/11392")] -#endif [Test] public void InitRegionInfo () {