Răsfoiți Sursa

2007-01-30 Adar Wesley <[email protected]>

        * FontUnitTest.cs: fixed implementation of IFormatProvider


svn path=/trunk/mcs/; revision=71970
Adar Wesley 19 ani în urmă
părinte
comite
1fa8adf0c3

+ 4 - 0
mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,7 @@
+2007-01-30  Adar Wesley <[email protected]>
+
+	* FontUnitTest.cs: fixed implementation of IFormatProvider
+
 2007-01-30  yonik <[email protected]>
 
      * ViewTest.cs: Add new test for post back events 

+ 4 - 2
mcs/class/System.Web/Test/System.Web.UI.WebControls/FontUnitTest.cs

@@ -291,12 +291,14 @@ namespace MonoTests.System.Web.UI.WebControls
 		{
 			public object GetFormat (Type format_type)
 			{
-				return Activator.CreateInstance (format_type);
+				if (format_type.IsAssignableFrom (this.GetType ())) {
+					return this;
+				}
+				return null;
 			}
 		}
 
 		[Test]
-        [Category ("NotWorking")]
 		public void FontUnit_IFormatProviderToString ()
 		{
 			MyFormatProvider mfp = new MyFormatProvider ();