Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/corlib/Test/System')
-rw-r--r--mcs/class/corlib/Test/System/ChangeLog10
-rwxr-xr-xmcs/class/corlib/Test/System/ConvertTest.cs12
-rw-r--r--mcs/class/corlib/Test/System/VersionTest.cs6
3 files changed, 27 insertions, 1 deletions
diff --git a/mcs/class/corlib/Test/System/ChangeLog b/mcs/class/corlib/Test/System/ChangeLog
index b271ba154f9..6d419bfee33 100644
--- a/mcs/class/corlib/Test/System/ChangeLog
+++ b/mcs/class/corlib/Test/System/ChangeLog
@@ -1,3 +1,13 @@
+2004-09-23 Martin Garton <martin@wrasse.demon.co.uk>
+
+ * ConvertTest.cs: Ensure ToType() fails with an ArgumentException in
+ a case where is cannot convert.
+
+2004-08-17 Sebastien Pouliot <sebastien@ximian.com>
+
+ * VersionTest.cs: Added tests when cloning a version with no build and
+ no revision numbers (-1).
+
2004-06-23 Sebastien Pouliot <sebastien@ximian.com>
* DoubleFormatterTest.cs: Added a new test for a negative roundtrip
diff --git a/mcs/class/corlib/Test/System/ConvertTest.cs b/mcs/class/corlib/Test/System/ConvertTest.cs
index bafdffdb566..44e5f547567 100755
--- a/mcs/class/corlib/Test/System/ConvertTest.cs
+++ b/mcs/class/corlib/Test/System/ConvertTest.cs
@@ -189,7 +189,17 @@ namespace MonoTests.System {
}
catch (Exception e) {
AssertEquals("#A33", typeof(ArgumentNullException), e.GetType());
- }
+ }
+
+ try {
+ /* should fail to convert string to any enumeration type. */
+ Convert.ChangeType("random string", typeof(DayOfWeek));
+ Fail();
+ }
+ catch (Exception e) {
+ AssertEquals("#A34", typeof(ArgumentException), e.GetType());
+ }
+
}
public void TestGetTypeCode() {
diff --git a/mcs/class/corlib/Test/System/VersionTest.cs b/mcs/class/corlib/Test/System/VersionTest.cs
index 635a485cadc..2467d963a48 100644
--- a/mcs/class/corlib/Test/System/VersionTest.cs
+++ b/mcs/class/corlib/Test/System/VersionTest.cs
@@ -135,6 +135,12 @@ public class VersionTest : TestCase
Assert ("A1", v1.Equals (v2));
Assert ("A2", !ReferenceEquals (v1, v2));
+
+ Version v3 = new Version (); // 0.0
+ v2 = (Version) v3.Clone ();
+
+ Assert ("A3", v3.Equals (v2));
+ Assert ("A4", !ReferenceEquals (v3, v2));
}
public void TestCompareTo ()