Author: jpobst
Date: 2007-03-24 12:05:40 -0500 (Sat, 24 Mar 2007)
New Revision: 74940

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ProgressBar.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollBar.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Timer.cs
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ProgressBarTest.cs
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TimerTest.cs
Log:
2007-03-24  Jonathan Pobst  <[EMAIL PROTECTED]>

        * ProgressBar.cs: Throw AOORE instead of AE for property Value (2.0).
        * ScrollBar.cs: Throw AOORE instead of AE for properties LargeChange,
        SmallChange, and Value (2.0).
        * Timer.cs: Throw AOORE instead of AE for property Interval (2.0).

2007-03-24  Jonathan Pobst  <[EMAIL PROTECTED]>

        * ProgressBarTest.cs, ScrollBarTest.cs, TimerTest.cs: Update
        tests to pass on .Net 2.0.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-03-24 16:50:57 UTC (rev 74939)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-03-24 17:05:40 UTC (rev 74940)
@@ -1,3 +1,10 @@
+2007-03-24  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * ProgressBar.cs: Throw AOORE instead of AE for property Value (2.0).
+       * ScrollBar.cs: Throw AOORE instead of AE for properties LargeChange,
+       SmallChange, and Value (2.0).
+       * Timer.cs: Throw AOORE instead of AE for property Interval (2.0).
+
 2007-03-23  Carlos Alberto Cortez <[EMAIL PROTECTED]>
 
        * ListView.cs: Always set item_control.Width in LayoutDetails

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ProgressBar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ProgressBar.cs   
2007-03-24 16:50:57 UTC (rev 74939)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ProgressBar.cs   
2007-03-24 17:05:40 UTC (rev 74940)
@@ -385,9 +385,11 @@
                        }
                        set {
                                if (value < Minimum || value > Maximum)
-                                       throw new ArgumentException(
-                                               string.Format("'{0}' is not a 
valid value for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'", 
value));
-
+#if NET_2_0
+                                       throw new ArgumentOutOfRangeException 
("Value", string.Format("'{0}' is not a valid value for 'Value'. 'Value' should 
be between 'Minimum' and 'Maximum'", value));
+#else
+                                       throw new 
ArgumentException(string.Format("'{0}' is not a valid value for 'Value'. 
'Value' should be between 'Minimum' and 'Maximum'", value));
+#endif
                                val = value;
                                Refresh ();
                        }

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollBar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollBar.cs     
2007-03-24 16:50:57 UTC (rev 74939)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollBar.cs     
2007-03-24 17:05:40 UTC (rev 74940)
@@ -334,7 +334,11 @@
                        }
                        set {
                                if (value < 0)
+#if NET_2_0
+                                       throw new ArgumentOutOfRangeException 
("LargeChange", string.Format ("Value '{0}' must be greater than or equal to 
0.", value));
+#else
                                        throw new ArgumentException( 
string.Format("Value '{0}' must be greater than or equal to 0.", value));
+#endif
 
                                if (large_change != value) {
                                        large_change = value;
@@ -439,7 +443,11 @@
                        get { return small_change; }
                        set {
                                if ( value < 0 )
+#if NET_2_0
+                                       throw new ArgumentOutOfRangeException 
("SmallChange", string.Format ("Value '{0}' must be greater than or equal to 
0.", value));
+#else
                                        throw new ArgumentException( 
string.Format("Value '{0}' must be greater than or equal to 0.", value));
+#endif
 
                                if (small_change != value) {
                                        small_change = value;
@@ -471,8 +479,11 @@
                        get { return position; }
                        set {
                                if ( value < minimum || value > maximum )
-                                       throw new ArgumentException(
-                                               string.Format("'{0}' is not a 
valid value for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'", 
value));
+#if NET_2_0
+                                       throw new ArgumentOutOfRangeException 
("Value", string.Format ("'{0}' is not a valid value for 'Value'. 'Value' 
should be between 'Minimum' and 'Maximum'", value));
+#else
+                                       throw new ArgumentException 
(string.Format("'{0}' is not a valid value for 'Value'. 'Value' should be 
between 'Minimum' and 'Maximum'", value));
+#endif                                 
 
                                if (position != value){
                                        position = value;

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Timer.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Timer.cs 
2007-03-24 16:50:57 UTC (rev 74939)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Timer.cs 
2007-03-24 17:05:40 UTC (rev 74940)
@@ -82,7 +82,11 @@
                        }
                        set {
                                if (value <= 0)
+#if NET_2_0
+                                       throw new ArgumentOutOfRangeException 
("Interval", string.Format ("'{0}' is not a valid value for Interval. Interval 
must be greater than 0.", value));
+#else                          
                                        throw new ArgumentException 
(string.Format("'{0}' is not a valid value for Interval. Interval must be 
greater than 0.", value));
+#endif                                 
 
                                if (interval == value) {
                                        return;

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2007-03-24 16:50:57 UTC (rev 74939)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2007-03-24 17:05:40 UTC (rev 74940)
@@ -1,3 +1,8 @@
+2007-03-24  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * ProgressBarTest.cs, ScrollBarTest.cs, TimerTest.cs: Update
+       tests to pass on .Net 2.0.
+
 2007-03-22  Jonathan Pobst  <[EMAIL PROTECTED]>
 
        * FormTest.cs: Mark new test FormStartupPositionChangeTest as 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ProgressBarTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ProgressBarTest.cs
  2007-03-24 16:50:57 UTC (rev 74939)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ProgressBarTest.cs
  2007-03-24 17:05:40 UTC (rev 74940)
@@ -58,7 +58,11 @@
                }
                
                [Test]
-               [ExpectedException (typeof (ArgumentException))]                
+#if NET_2_0
+               [ExpectedException (typeof (ArgumentOutOfRangeException))]
+#else
+               [ExpectedException (typeof (ArgumentException))]
+#endif
                public void ValueTest ()
                {
                        ProgressBar myProgressBar = new ProgressBar ();

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
    2007-03-24 16:50:57 UTC (rev 74939)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
    2007-03-24 17:05:40 UTC (rev 74940)
@@ -325,8 +325,12 @@
               }
 
            [Test]
-             [ExpectedException (typeof (ArgumentException))]
-           public void ExceptionValueTest ()
+#if NET_2_0
+               [ExpectedException (typeof (ArgumentOutOfRangeException))]
+#else
+          [ExpectedException (typeof (ArgumentException))]
+#endif
+          public void ExceptionValueTest ()
               {
                       MyScrollBar myscrlbar = new MyScrollBar ();
                       myscrlbar.Minimum = 10;
@@ -336,16 +340,24 @@
               }
 
            [Test]
-             [ExpectedException (typeof (ArgumentException))]
-           public void ExceptionSmallChangeTest ()
+#if NET_2_0
+               [ExpectedException (typeof (ArgumentOutOfRangeException))]
+#else
+          [ExpectedException (typeof (ArgumentException))]
+#endif
+          public void ExceptionSmallChangeTest ()
               {
                       MyScrollBar myscrlbar = new MyScrollBar ();
                       myscrlbar.SmallChange = -1;
               }
 
            [Test]
-             [ExpectedException (typeof (ArgumentException))]
-           public void ExceptionLargeChangeTest ()
+#if NET_2_0
+               [ExpectedException (typeof (ArgumentOutOfRangeException))]
+#else
+          [ExpectedException (typeof (ArgumentException))]
+#endif
+          public void ExceptionLargeChangeTest ()
               {
                       MyScrollBar myscrlbar = new MyScrollBar ();
                       myscrlbar.LargeChange = -1;

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TimerTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TimerTest.cs    
    2007-03-24 16:50:57 UTC (rev 74939)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TimerTest.cs    
    2007-03-24 17:05:40 UTC (rev 74940)
@@ -21,7 +21,11 @@
                bool Ticked;
                
                [Test ()]
+#if NET_2_0
+               [ExpectedException (typeof (ArgumentOutOfRangeException))]
+#else
                [ExpectedException (typeof (ArgumentException))]
+#endif
                public void IntervalException1 ()
                {
                        Timer timer = new Timer ();
@@ -29,7 +33,11 @@
                }
 
                [Test ()]
+#if NET_2_0
+               [ExpectedException (typeof (ArgumentOutOfRangeException))]
+#else
                [ExpectedException (typeof (ArgumentException), "'-1' is not a 
valid value for Interval. Interval must be greater than 0.")]
+#endif
                public void IntervalException2 ()
                {
                        Timer timer = new Timer ();
@@ -44,7 +52,11 @@
                }
 
                [Test ()]
+#if NET_2_0
+               [ExpectedException (typeof (ArgumentOutOfRangeException))]
+#else
                [ExpectedException (typeof (ArgumentException), "'-2147483648' 
is not a valid value for Interval. Interval must be greater than 0.")]
+#endif
                public void IntervalException4 ()
                {
                        Timer timer = new Timer ();

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

Reply via email to