Author: gert
Date: 2007-05-27 11:11:57 -0400 (Sun, 27 May 2007)
New Revision: 78011

Modified:
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/NumericUpDownTest.cs
Log:
* NumericUpDownTest.cs: Avoid use of global identifier since csc 1.x
does not support this.
* FormTest.cs: Avoid using anonymous methods. Allows our test to build
again using csc 1.x.


Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2007-05-27 15:07:26 UTC (rev 78010)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2007-05-27 15:11:57 UTC (rev 78011)
@@ -1,5 +1,12 @@
 2007-05-27  Gert Driesen  <[EMAIL PROTECTED]>
 
+       * NumericUpDownTest.cs: Avoid use of global identifier since csc 1.x
+       does not support this.
+       * FormTest.cs: Avoid using anonymous methods. Allows our test to build
+       again using csc 1.x.
+
+2007-05-27  Gert Driesen  <[EMAIL PROTECTED]>
+
        * TreeNodeCollectionTest.cs: Added tests for Add and AddRange. Fixed
        and improved test for IList indexer.
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs 
2007-05-27 15:07:26 UTC (rev 78010)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs 
2007-05-27 15:11:57 UTC (rev 78011)
@@ -29,7 +29,7 @@
                        using (TimeBombedForm f = new TimeBombedForm ()) {
                                EventLogger log = new EventLogger (f);
                                f.timer.Interval = 1000;
-                               f.VisibleChanged += delegate (object sender, 
EventArgs e) { f.Reason = "VisibleChanged"; ((Control)sender).Visible = false; 
};
+                               f.VisibleChanged += new EventHandler 
(Form_VisibleChanged1);
                                f.ShowDialog ();
                                
                                Assert.AreEqual ("VisibleChanged", f.Reason, 
"#00");
@@ -67,13 +67,7 @@
 
                        using (TimeBombedForm f = new TimeBombedForm ()) {
                                EventLogger log = new EventLogger (f);
-                               f.VisibleChanged += delegate (object sender, 
EventArgs e) 
-                               { 
-                                       f.Reason = "VisibleChanged"; 
-                                       f.Visible = false;
-                                       f.DialogResult = DialogResult.OK;
-                                       Assert.AreEqual (false, f.Visible, 
"#B?");
-                               };
+                               f.VisibleChanged += new EventHandler 
(Form_VisibleChanged2);
                                f.ShowDialog ();
 
                                Assert.AreEqual ("VisibleChanged", f.Reason, 
"#B0");
@@ -111,9 +105,24 @@
                                
                                Assert.AreEqual (DialogResult.Cancel, 
f.DialogResult, "#C7");
                        }
+               }
 
+               void Form_VisibleChanged1 (object sender, EventArgs e)
+               {
+                       TimeBombedForm f = (TimeBombedForm) sender;
+                       f.Reason = "VisibleChanged";
+                       f.Visible = false;
                }
-       
+
+               void Form_VisibleChanged2 (object sender, EventArgs e)
+               {
+                       TimeBombedForm f = (TimeBombedForm) sender;
+                       f.Reason = "VisibleChanged";
+                       f.Visible = false;
+                       f.DialogResult = DialogResult.OK;
+                       Assert.IsFalse (f.Visible);
+               }
+
                [Test]
                public void DialogOwnerTest ()
                {

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/NumericUpDownTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/NumericUpDownTest.cs
        2007-05-27 15:07:26 UTC (rev 78010)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/NumericUpDownTest.cs
        2007-05-27 15:11:57 UTC (rev 78011)
@@ -2,6 +2,7 @@
 using System;
 using System.ComponentModel;
 using System.Drawing;
+using System.Globalization;
 using System.Reflection;
 using System.Windows.Forms;
 using System.Collections;
@@ -83,7 +84,7 @@
                [Test]
                public void Hexadecimal ()
                {
-                       Threading.Thread.CurrentThread.CurrentCulture = new 
global::System.Globalization.CultureInfo ("en-US");
+                       Threading.Thread.CurrentThread.CurrentCulture = new 
CultureInfo ("en-US");
                        Form f = new Form ();
                        NumericUpDown nud = new NumericUpDown ();
                        nud.Maximum = 100000;
@@ -100,7 +101,7 @@
                [Test]
                public void ThousandsSeparator ()
                {
-                       Threading.Thread.CurrentThread.CurrentCulture = new 
global::System.Globalization.CultureInfo ("en-US");
+                       Threading.Thread.CurrentThread.CurrentCulture = new 
CultureInfo ("en-US");
                        Form f = new Form ();
                        NumericUpDown nud = new NumericUpDown ();
                        nud.Maximum = 100000;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to