diff options
author | Alexis Christoforides <alexis@thenull.net> | 2017-11-16 22:05:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-16 22:05:47 +0300 |
commit | 0435b2ba1665da0563c7e687383913395770b3af (patch) | |
tree | 264ba14ada0cefe6171f42ec5d5e0c5422db4b31 /mcs | |
parent | 8a82b292fbe3901e2ed277f2290bb0e41f757e29 (diff) | |
parent | ae9cef910378a619cbc68433ae4a05c96f605f22 (diff) |
Merge pull request #6027 from lewurm/fix-DefaultThreadCurrentCultureIsIgnoredWhenCultureFlowsToThread
[corlib] fix DefaultThreadCurrentCultureIsIgnoredWhenCultureFlowsToThread test
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs b/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs index 766065b67be..188fc33b5e8 100644 --- a/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs +++ b/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs @@ -730,6 +730,14 @@ namespace MonoTests.System.Globalization string us_str = null; string br_str = null; + /* explicitly set CurrentCulture, as the documentation states: + * > If you have not explicitly set the culture of any existing + * > threads executing in an application domain, setting the + * > P:System.Globalization.CultureInfo.DefaultThreadCurrentCulture + * > property also changes the culture of these threads. + */ + Thread.CurrentThread.CurrentCulture = old_culture; + var thread = new Thread (() => { CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US"); us_str = 100000.ToString ("C"); |