2007-04-23 Chris Toshok <toshok@ximian.com>
authorChris Toshok <toshok@novell.com>
Mon, 23 Apr 2007 16:33:54 +0000 (16:33 -0000)
committerChris Toshok <toshok@novell.com>
Mon, 23 Apr 2007 16:33:54 +0000 (16:33 -0000)
* TestHelper.cs: move RunningOnUnix here.

* FocusTest.cs: use TestHelper.RunningOnUnix.

* FormTest.cs: use TestHelper.RunningOnUnix.

svn path=/trunk/mcs/; revision=76134

mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FocusTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TestHelper.cs

index 26068c1219f031a0e14c14d5c48cb2ebb9622dec..1dcadb976cdbd1da584e3131675b5d756f5dfb10 100644 (file)
@@ -1,3 +1,11 @@
+2007-04-23  Chris Toshok  <toshok@ximian.com>
+
+       * TestHelper.cs: move RunningOnUnix here.
+
+       * FocusTest.cs: use TestHelper.RunningOnUnix.
+
+       * FormTest.cs: use TestHelper.RunningOnUnix.
+
 2007-04-23  Jonathan Pobst  <monkey@jpobst.com>
 
        * TableLayoutTest.cs: Add a bunch of tests I thought I had lost
index b4319928abd22b3e2e876175d3c5c8c9f7f1ea6a..d48d8c611cdff4a05ae6354a31b0b0a77aed2801 100644 (file)
@@ -99,7 +99,7 @@ namespace MonoTests.System.Windows.Forms {
                [Test]
                public void ControlSelectNextFlatTest ()
                {
-                       if (RunningOnUnix) {
+                       if (TestHelper.RunningOnUnix) {
                                Assert.Ignore ("Relies on form.Show() synchronously generating WM_ACTIVATE");
                        }
 
@@ -827,7 +827,7 @@ namespace MonoTests.System.Windows.Forms {
                [Test]
                public void ActiveControl ()
                {
-                       if (RunningOnUnix) {
+                       if (TestHelper.RunningOnUnix) {
                                Assert.Ignore ("Relies on form.Show() synchronously generating WM_ACTIVATE");
                        }
 
@@ -980,7 +980,7 @@ namespace MonoTests.System.Windows.Forms {
                [Test]
                public void EnterLeaveFocusEventTest ()
                {
-                       if (RunningOnUnix) {
+                       if (TestHelper.RunningOnUnix) {
                                Assert.Ignore ("Relies on form.Show() synchronously generating WM_ACTIVATE");
                        }
 
@@ -1196,14 +1196,5 @@ OnGotFocus: ContainerControl 1 System.Windows.Forms.ContainerControl
 
                        form.Dispose ();
                }
-
-               private bool RunningOnUnix {
-                       get {
-                               // check for Unix platforms - see FAQ for more details
-                               // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
-                               int platform = (int) Environment.OSVersion.Platform;
-                               return ((platform == 4) || (platform == 128));
-                       }
-               }
        }
 }
index bc55894ba4c8a7d8775926deac8da6e47f2c5a63..d77cb8c29b040f8f4950ab5c16bd0a36d00860cd 100644 (file)
@@ -1351,7 +1351,7 @@ namespace MonoTests.System.Windows.Forms
                [Test]
                public void OnActivateEventHandlingTest1 ()
                {
-                       if (RunningOnUnix) {
+                       if (TestHelper.RunningOnUnix) {
                                Assert.Ignore ("Relies on form.Show() synchronously generating WM_ACTIVATE");
                        }
 
@@ -1579,15 +1579,6 @@ namespace MonoTests.System.Windows.Forms
                        Assert.AreEqual (null, f.Owner, "H1");
                }
 
-               private bool RunningOnUnix {
-                       get {
-                               // check for Unix platforms - see FAQ for more details
-                               // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
-                               int platform = (int) Environment.OSVersion.Platform;
-                               return ((platform == 4) || (platform == 128));
-                       }
-               }
-
                private class MockForm : Form
                {
                        public bool CloseOnLoad {
index 9c41932fda4bc550c135dfc1b14f33f9f4e95bc8..4e9f084578d353caef720ba36f6faafa04f4e025 100644 (file)
@@ -43,6 +43,15 @@ namespace MonoTests.System.Windows.Forms
                        CreateParams cp = GetCreateParams (control);
                        return ((cp.ExStyle & (int) style) == (int) style);
                }
+
+               public static bool RunningOnUnix {
+                       get {
+                               // check for Unix platforms - see FAQ for more details
+                               // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
+                               int platform = (int) Environment.OSVersion.Platform;
+                               return ((platform == 4) || (platform == 128));
+                       }
+               }
        }
        
        [Flags]