2005-02-12 Ben Maurer <bmaurer@ximian.com>
authorBen Maurer <benm@mono-cvs.ximian.com>
Sat, 12 Feb 2005 18:35:48 +0000 (18:35 -0000)
committerBen Maurer <benm@mono-cvs.ximian.com>
Sat, 12 Feb 2005 18:35:48 +0000 (18:35 -0000)
* *: Fix up tests on 2.0 by explicitly boxing.

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

mcs/class/corlib/Test/System/ByteTest.cs
mcs/class/corlib/Test/System/ChangeLog
mcs/class/corlib/Test/System/Int16Test.cs
mcs/class/corlib/Test/System/Int32Test.cs
mcs/class/corlib/Test/System/Int64Test.cs
mcs/class/corlib/Test/System/UInt16Test.cs
mcs/class/corlib/Test/System/UInt32Test.cs
mcs/class/corlib/Test/System/UInt64Test.cs

index b606de65f7f1884d2fd39f216ad56d89845772ed..3c638b8ea9141e5155b429172c29d1aadb2bf6ba 100644 (file)
@@ -98,10 +98,10 @@ public class ByteTest : Assertion
        {
                Assert(MyByte3.CompareTo(MyByte2) > 0);
                Assert(MyByte2.CompareTo(MyByte2) == 0);
-               Assert(MyByte1.CompareTo((Byte)42) == 0);
+               Assert(MyByte1.CompareTo((object)(Byte)42) == 0);
                Assert(MyByte2.CompareTo(MyByte3) < 0);
                try {
-                       MyByte2.CompareTo(100);
+                       MyByte2.CompareTo((object)100);
                        Fail("Should raise a System.ArgumentException");
                }
                catch (Exception e) {
@@ -112,8 +112,8 @@ public class ByteTest : Assertion
        public void TestEquals()
        {
                Assert(MyByte1.Equals(MyByte1));
-               Assert(MyByte1.Equals((Byte)42));
-               Assert(MyByte1.Equals((Int16)42) == false);
+               Assert(MyByte1.Equals((object)(Byte)42));
+               Assert(MyByte1.Equals((object)(Int16)42) == false);
                Assert(MyByte1.Equals(MyByte2) == false);
        }
        
index 439072ab54936b0b07c718413aac4054778e044d..c35d3635dbf05c138aaf9b4cb8ee3ad5ca3c8134 100644 (file)
@@ -1,3 +1,7 @@
+2005-02-12  Ben Maurer  <bmaurer@ximian.com>
+
+       * *: Fix up tests on 2.0 by explicitly boxing.
+
 2005-02-11  Nick Drochak  <ndrochak@ieee.org>
 
        * NumberFormatterTest.cs:
index a0becba34c01a51ca6f53526283ccd945bebf440..aa4285eadd9b34b7cb289fe0153709975e042f2e 100644 (file)
@@ -69,7 +69,7 @@ public class Int16Test : Assertion
                Assert(MyInt16_1.CompareTo((Int16)(-42)) == 0);
                Assert(MyInt16_2.CompareTo(MyInt16_3) < 0);
                try {
-                       MyInt16_2.CompareTo(100);
+                       MyInt16_2.CompareTo((object)100);
                        Fail("Should raise a System.ArgumentException");
                }
                catch (Exception e) {
@@ -80,8 +80,8 @@ public class Int16Test : Assertion
        public void TestEquals()
        {
                Assert(MyInt16_1.Equals(MyInt16_1));
-               Assert(MyInt16_1.Equals((Int16)(-42)));
-               Assert(MyInt16_1.Equals((SByte)(-42)) == false);
+               Assert(MyInt16_1.Equals((object)(Int16)(-42)));
+               Assert(MyInt16_1.Equals((object)(SByte)(-42)) == false);
                Assert(MyInt16_1.Equals(MyInt16_2) == false);
        }
        
index 3c121165f397b2ab0eeaf29ad57ecf2501dd29e1..50fd2d54dce869b004cf60699cb496b1e26731af 100644 (file)
@@ -79,10 +79,10 @@ public class Int32Test : Assertion
        {
                Assert("MyInt32_3.CompareTo(MyInt32_2) > 0", MyInt32_3.CompareTo(MyInt32_2) > 0);
                Assert("MyInt32_2.CompareTo(MyInt32_2) == 0", MyInt32_2.CompareTo(MyInt32_2) == 0);
-               Assert("MyInt32_1.CompareTo((Int32)(-42)) == 0", MyInt32_1.CompareTo((Int32)(-42)) == 0);
+               Assert("MyInt32_1.CompareTo((Int32)(-42)) == 0", MyInt32_1.CompareTo((object)(Int32)(-42)) == 0);
                Assert("MyInt32_2.CompareTo(MyInt32_3) < 0", MyInt32_2.CompareTo(MyInt32_3) < 0);
                try {
-                       MyInt32_2.CompareTo((Int16)100);
+                       MyInt32_2.CompareTo((object)(Int16)100);
                        Fail("Should raise a System.ArgumentException");
                }
                catch (Exception e) {
@@ -94,7 +94,7 @@ public class Int32Test : Assertion
        {
                Assert ("#B01", MyInt32_1.Equals (MyInt32_1));
                Assert ("#B02", MyInt32_1.Equals ((Int32)(-42)));
-               Assert ("#B03", MyInt32_1.Equals ((SByte)(-42)) == false);
+               Assert ("#B03", MyInt32_1.Equals ((object)(SByte)(-42)) == false);
                Assert ("#B04", MyInt32_1.Equals (MyInt32_2) == false);
        }
        
index 00f11b8f4cf8a79515c2656ba76a121278f6ebf7..3f18472d7a52de07e2124d14a353f5232f684da2 100644 (file)
@@ -120,10 +120,10 @@ public class Int64Test : Assertion
        {
                Assert(MyInt64_3.CompareTo(MyInt64_2) > 0);
                Assert(MyInt64_2.CompareTo(MyInt64_2) == 0);
-               Assert(MyInt64_1.CompareTo((Int64)(-42)) == 0);
+               Assert(MyInt64_1.CompareTo((object)(Int64)(-42)) == 0);
                Assert(MyInt64_2.CompareTo(MyInt64_3) < 0);
                try {
-                       MyInt64_2.CompareTo((Int16)100);
+                       MyInt64_2.CompareTo((object)(Int16)100);
                        Fail("Should raise a System.ArgumentException");
                }
                catch (Exception e) {
@@ -134,8 +134,8 @@ public class Int64Test : Assertion
        public void TestEquals()
        {
                Assert(MyInt64_1.Equals(MyInt64_1));
-               Assert(MyInt64_1.Equals((Int64)(-42)));
-               Assert(MyInt64_1.Equals((SByte)(-42)) == false);
+               Assert(MyInt64_1.Equals((object)(Int64)(-42)));
+               Assert(MyInt64_1.Equals((object)(SByte)(-42)) == false);
                Assert(MyInt64_1.Equals(MyInt64_2) == false);
        }
        
index 6970089e27394d45f296f8f3e3ff741bbbb1d003..18bf0475cba7f19cac05f64ecb77c289734000ae 100644 (file)
@@ -81,7 +81,7 @@ public class UInt16Test : Assertion
                Assert(MyUInt16_1.CompareTo((UInt16)(42)) == 0);
                Assert(MyUInt16_2.CompareTo(MyUInt16_3) < 0);
                try {
-                       MyUInt16_2.CompareTo(100);
+                       MyUInt16_2.CompareTo((object)100);
                        Fail("Should raise a System.ArgumentException");
                }
                catch (Exception e) {
@@ -92,8 +92,8 @@ public class UInt16Test : Assertion
        public void TestEquals()
        {
                Assert(MyUInt16_1.Equals(MyUInt16_1));
-               Assert(MyUInt16_1.Equals((UInt16)(42)));
-               Assert(MyUInt16_1.Equals((SByte)(42)) == false);
+               Assert(MyUInt16_1.Equals((object)(UInt16)(42)));
+               Assert(MyUInt16_1.Equals((object)(SByte)(42)) == false);
                Assert(MyUInt16_1.Equals(MyUInt16_2) == false);
        }
        
index 402e2922deb017e1e68b887d1329bc236ff627b9..525f3d53fb3de702ceaacae9ae8eaac3d9d1f9b5 100644 (file)
@@ -101,7 +101,7 @@ public class UInt32Test : Assertion
                        Assert (typeof (FormatException) == e.GetType ());
                }
                try {
-                       MyUInt32_2.CompareTo((Int16)100);
+                       MyUInt32_2.CompareTo((object)(Int16)100);
                        Fail("Should raise a System.ArgumentException");
                }
                catch (Exception e) {
@@ -112,8 +112,8 @@ public class UInt32Test : Assertion
        public void TestEquals()
        {
                Assert(MyUInt32_1.Equals(MyUInt32_1));
-               Assert(MyUInt32_1.Equals((UInt32)(42)));
-               Assert(MyUInt32_1.Equals((SByte)(42)) == false);
+               Assert(MyUInt32_1.Equals((object)(UInt32)(42)));
+               Assert(MyUInt32_1.Equals((object)(SByte)(42)) == false);
                Assert(MyUInt32_1.Equals(MyUInt32_2) == false);
        }
        
index 9a5e6ca9368cbe8028d3c2316b0d07a72622834d..77a2947b3cf7a4d1317ccee532c54fc47e4c8c69 100644 (file)
@@ -85,7 +85,7 @@ public class UInt64Test : Assertion
                Assert(MyUInt64_1.CompareTo((UInt64)(42)) == 0);
                Assert(MyUInt64_2.CompareTo(MyUInt64_3) < 0);
                try {
-                       MyUInt64_2.CompareTo((Int16)100);
+                       MyUInt64_2.CompareTo((object)(Int16)100);
                        Fail("Should raise a System.ArgumentException");
                }
                catch (Exception e) {
@@ -96,8 +96,8 @@ public class UInt64Test : Assertion
        public void TestEquals()
        {
                Assert(MyUInt64_1.Equals(MyUInt64_1));
-               Assert(MyUInt64_1.Equals((UInt64)(42)));
-               Assert(MyUInt64_1.Equals((SByte)(42)) == false);
+               Assert(MyUInt64_1.Equals((object)(UInt64)(42)));
+               Assert(MyUInt64_1.Equals((object)(SByte)(42)) == false);
                Assert(MyUInt64_1.Equals(MyUInt64_2) == false);
        }