Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2017-09-18 21:58:44 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2017-09-19 11:58:58 +0300
commit8efc784bd99a6bc2519afedd5eef985b2dab0eb7 (patch)
tree9a6838b9a52ba0cbfb2e78dba6edb628f78fd13e /mcs/class/WindowsBase
parent6e2db26f5ed7b992de75d07522bb215a43af124a (diff)
[WindowsBase] Use InvariantCulture for ConvertTo/ToString tests
They'd fail on locales such as de-DE before which uses ';' as separator.
Diffstat (limited to 'mcs/class/WindowsBase')
-rw-r--r--mcs/class/WindowsBase/Test/System.Windows.Media/MatrixConverterTest.cs3
-rw-r--r--mcs/class/WindowsBase/Test/System.Windows.Media/MatrixTest.cs3
-rw-r--r--mcs/class/WindowsBase/Test/System.Windows/Int32RectConverterTest.cs4
-rw-r--r--mcs/class/WindowsBase/Test/System.Windows/Int32RectTest.cs3
-rw-r--r--mcs/class/WindowsBase/Test/System.Windows/PointConverterTest.cs3
-rw-r--r--mcs/class/WindowsBase/Test/System.Windows/RectConverterTest.cs3
-rw-r--r--mcs/class/WindowsBase/Test/System.Windows/SizeConverterTest.cs3
-rw-r--r--mcs/class/WindowsBase/Test/System.Windows/SizeTest.cs3
-rw-r--r--mcs/class/WindowsBase/Test/System.Windows/VectorConverterTest.cs3
-rw-r--r--mcs/class/WindowsBase/Test/System.Windows/VectorTest.cs3
10 files changed, 20 insertions, 11 deletions
diff --git a/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixConverterTest.cs b/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixConverterTest.cs
index 9134aec4b47..f9e15374908 100644
--- a/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixConverterTest.cs
+++ b/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixConverterTest.cs
@@ -1,5 +1,6 @@
using NUnit.Framework;
using System;
+using System.Globalization;
using System.Windows.Media;
namespace MonoTests.System.Windows.Media {
@@ -56,7 +57,7 @@ namespace MonoTests.System.Windows.Media {
{
var conv = new MatrixConverter ();
var matrix = new Matrix (1, 2, 3, 4, 5, 6);
- object obj = conv.ConvertTo (matrix, typeof (string));
+ object obj = conv.ConvertTo (null, CultureInfo.InvariantCulture, matrix, typeof (string));
Assert.AreEqual (typeof (string), obj.GetType ());
Assert.AreEqual ("1,2,3,4,5,6", (string)obj);
}
diff --git a/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixTest.cs b/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixTest.cs
index cbccb4339bb..29503407fb1 100644
--- a/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixTest.cs
+++ b/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixTest.cs
@@ -24,6 +24,7 @@
//
using System;
+using System.Globalization;
using System.Windows;
using System.Windows.Media;
using NUnit.Framework;
@@ -347,7 +348,7 @@ namespace MonoTests.System.Windows.Media {
public void ToStringTest ()
{
Matrix m = new Matrix (1, 2, 3, 4, 5, 6);
- Assert.AreEqual ("1,2,3,4,5,6", m.ToString());
+ Assert.AreEqual ("1,2,3,4,5,6", m.ToString(CultureInfo.InvariantCulture));
m = Matrix.Identity;
Assert.AreEqual ("Identity", m.ToString());
}
diff --git a/mcs/class/WindowsBase/Test/System.Windows/Int32RectConverterTest.cs b/mcs/class/WindowsBase/Test/System.Windows/Int32RectConverterTest.cs
index 64375844ccd..2aecc932a3a 100644
--- a/mcs/class/WindowsBase/Test/System.Windows/Int32RectConverterTest.cs
+++ b/mcs/class/WindowsBase/Test/System.Windows/Int32RectConverterTest.cs
@@ -24,6 +24,7 @@
//
using System;
+using System.Globalization;
using System.Windows;
using System.Windows.Media;
using NUnit.Framework;
@@ -88,14 +89,13 @@ namespace MonoTests.System.Windows {
}
[Test]
- [Category ("NotWorking")]
public void ConvertTo ()
{
Int32RectConverter r = new Int32RectConverter ();
Int32Rect rect = new Int32Rect (0, 0, 1, 2);
- object o = r.ConvertTo (rect, typeof (string));
+ object o = r.ConvertTo (null, CultureInfo.InvariantCulture, rect, typeof (string));
Assert.AreEqual (typeof (string), o.GetType());
Assert.AreEqual ("0,0,1,2", (string)o);
diff --git a/mcs/class/WindowsBase/Test/System.Windows/Int32RectTest.cs b/mcs/class/WindowsBase/Test/System.Windows/Int32RectTest.cs
index ffd571f3a19..d65da4e23f2 100644
--- a/mcs/class/WindowsBase/Test/System.Windows/Int32RectTest.cs
+++ b/mcs/class/WindowsBase/Test/System.Windows/Int32RectTest.cs
@@ -24,6 +24,7 @@
//
using System;
+using System.Globalization;
using System.Windows;
using System.Windows.Media;
using NUnit.Framework;
@@ -136,7 +137,7 @@ namespace MonoTests.System.Windows {
public void ToStringTest ()
{
Int32Rect r = new Int32Rect (1, 2, 3, 4);
- Assert.AreEqual ("1,2,3,4", r.ToString());
+ Assert.AreEqual ("1,2,3,4", r.ToString(CultureInfo.InvariantCulture));
Assert.AreEqual ("Empty", Int32Rect.Empty.ToString());
}
diff --git a/mcs/class/WindowsBase/Test/System.Windows/PointConverterTest.cs b/mcs/class/WindowsBase/Test/System.Windows/PointConverterTest.cs
index 93d33bc678a..9e80eb1dedf 100644
--- a/mcs/class/WindowsBase/Test/System.Windows/PointConverterTest.cs
+++ b/mcs/class/WindowsBase/Test/System.Windows/PointConverterTest.cs
@@ -24,6 +24,7 @@
//
using System;
+using System.Globalization;
using System.Windows;
using System.Windows.Media;
using NUnit.Framework;
@@ -82,7 +83,7 @@ namespace MonoTests.System.Windows {
Point rect = new Point (1, 2);
- object o = r.ConvertTo (rect, typeof (string));
+ object o = r.ConvertTo (null, CultureInfo.InvariantCulture, rect, typeof (string));
Assert.AreEqual (typeof (string), o.GetType());
Assert.AreEqual ("1,2", (string)o);
diff --git a/mcs/class/WindowsBase/Test/System.Windows/RectConverterTest.cs b/mcs/class/WindowsBase/Test/System.Windows/RectConverterTest.cs
index 3d2b6b12a72..0e1161c9dca 100644
--- a/mcs/class/WindowsBase/Test/System.Windows/RectConverterTest.cs
+++ b/mcs/class/WindowsBase/Test/System.Windows/RectConverterTest.cs
@@ -24,6 +24,7 @@
//
using System;
+using System.Globalization;
using System.Windows;
using System.Windows.Media;
using NUnit.Framework;
@@ -92,7 +93,7 @@ namespace MonoTests.System.Windows {
Rect rect = new Rect (0, 0, 1, 2);
- object o = r.ConvertTo (rect, typeof (string));
+ object o = r.ConvertTo (null, CultureInfo.InvariantCulture, rect, typeof (string));
Assert.AreEqual (typeof (string), o.GetType());
Assert.AreEqual ("0,0,1,2", (string)o);
diff --git a/mcs/class/WindowsBase/Test/System.Windows/SizeConverterTest.cs b/mcs/class/WindowsBase/Test/System.Windows/SizeConverterTest.cs
index d320100f1a0..74a0f0b3be1 100644
--- a/mcs/class/WindowsBase/Test/System.Windows/SizeConverterTest.cs
+++ b/mcs/class/WindowsBase/Test/System.Windows/SizeConverterTest.cs
@@ -24,6 +24,7 @@
//
using System;
+using System.Globalization;
using System.Windows;
using System.Windows.Media;
using NUnit.Framework;
@@ -86,7 +87,7 @@ namespace MonoTests.System.Windows {
Size rect = new Size (1, 2);
- object o = r.ConvertTo (rect, typeof (string));
+ object o = r.ConvertTo (null, CultureInfo.InvariantCulture, rect, typeof (string));
Assert.AreEqual (typeof (string), o.GetType());
Assert.AreEqual ("1,2", (string)o);
diff --git a/mcs/class/WindowsBase/Test/System.Windows/SizeTest.cs b/mcs/class/WindowsBase/Test/System.Windows/SizeTest.cs
index 6c04fd244d4..e9bb8d925c0 100644
--- a/mcs/class/WindowsBase/Test/System.Windows/SizeTest.cs
+++ b/mcs/class/WindowsBase/Test/System.Windows/SizeTest.cs
@@ -24,6 +24,7 @@
//
using System;
+using System.Globalization;
using System.Windows;
using System.Windows.Media;
using NUnit.Framework;
@@ -158,7 +159,7 @@ namespace MonoTests.System.Windows {
[Test]
public void ToStringTest ()
{
- Assert.AreEqual ("1,2", (new Size (1, 2)).ToString ());
+ Assert.AreEqual ("1,2", (new Size (1, 2)).ToString (CultureInfo.InvariantCulture));
}
[Test]
diff --git a/mcs/class/WindowsBase/Test/System.Windows/VectorConverterTest.cs b/mcs/class/WindowsBase/Test/System.Windows/VectorConverterTest.cs
index 8c2a7449635..af6dd725aea 100644
--- a/mcs/class/WindowsBase/Test/System.Windows/VectorConverterTest.cs
+++ b/mcs/class/WindowsBase/Test/System.Windows/VectorConverterTest.cs
@@ -24,6 +24,7 @@
//
using System;
+using System.Globalization;
using System.Windows;
using System.Windows.Media;
using NUnit.Framework;
@@ -82,7 +83,7 @@ namespace MonoTests.System.Windows {
Vector rect = new Vector (1, 2);
- object o = r.ConvertTo (rect, typeof (string));
+ object o = r.ConvertTo (null, CultureInfo.InvariantCulture, rect, typeof (string));
Assert.AreEqual (typeof (string), o.GetType());
Assert.AreEqual ("1,2", (string)o);
diff --git a/mcs/class/WindowsBase/Test/System.Windows/VectorTest.cs b/mcs/class/WindowsBase/Test/System.Windows/VectorTest.cs
index 2f203729adf..20e64e3134e 100644
--- a/mcs/class/WindowsBase/Test/System.Windows/VectorTest.cs
+++ b/mcs/class/WindowsBase/Test/System.Windows/VectorTest.cs
@@ -24,6 +24,7 @@
//
using System;
+using System.Globalization;
using System.Windows;
using System.Windows.Media;
using NUnit.Framework;
@@ -56,7 +57,7 @@ namespace MonoTests.System.Windows {
public void ToStringTest ()
{
Vector v = new Vector (4, 5);
- Assert.AreEqual ("4,5", v.ToString());
+ Assert.AreEqual ("4,5", v.ToString(CultureInfo.InvariantCulture));
}
[Test]