2010-05-21 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / mcs / class / System / Test / System.ComponentModel / Int16ConverterTests.cs
index 50d12bf1e13c3d1ea4a48104b9c8eb12b44b2a84..9b7b0dc9408325081e3f89513fae1a7cbfc668b4 100644 (file)
@@ -41,6 +41,7 @@ namespace MonoTests.System.ComponentModel
                {
                        Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#1");
                        Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#2");
+                       Assert.IsTrue (converter.CanConvertTo (typeof (int)), "#3");
                }
 
                [Test]
@@ -570,6 +571,19 @@ namespace MonoTests.System.ComponentModel
                                        return base.GetFormat (formatType);
                                }
                        }
+
+#if NET_2_0
+// adding this override in 1.x shows different result in .NET (it is ignored).
+// Some compatibility kids might want to fix this issue.
+                       public override NumberFormatInfo NumberFormat {
+                               get {
+                                       NumberFormatInfo nfi = (NumberFormatInfo) base.NumberFormat.Clone ();
+                                       nfi.NegativeSign = "myNegativeSign";
+                                       return nfi;
+                               }
+                               set { throw new NotSupportedException (); }
+                       }
+#endif
                }
        }
 }