Author: spouliot
Date: 2005-04-27 12:45:08 -0400 (Wed, 27 Apr 2005)
New Revision: 43666

Modified:
   
trunk/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/ChangeLog
   
trunk/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509CertificateCollectionTest.cs
Log:
2005-04-27  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * X509CertificateCollectionTest.cs: Re-enable the tests as they now 
        works on 2.0 beta2 exactly like under Mono.



Modified: 
trunk/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/ChangeLog
===================================================================
--- 
trunk/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/ChangeLog
 2005-04-27 15:56:19 UTC (rev 43665)
+++ 
trunk/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/ChangeLog
 2005-04-27 16:45:08 UTC (rev 43666)
@@ -1,3 +1,8 @@
+2005-04-27  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * X509CertificateCollectionTest.cs: Re-enable the tests as they now 
+       works on 2.0 beta2 exactly like under Mono.
+
 2005-02-02  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * X509CertificateCollectionTest.cs: Disable some tests which fail

Modified: 
trunk/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509CertificateCollectionTest.cs
===================================================================
--- 
trunk/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509CertificateCollectionTest.cs
  2005-04-27 15:56:19 UTC (rev 43665)
+++ 
trunk/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509CertificateCollectionTest.cs
  2005-04-27 16:45:08 UTC (rev 43666)
@@ -225,11 +225,6 @@
                }
 
                [Test]
-#if NET_2_0
-               [Category ("NotWorking")]
-               // The last test depends on Equals () doing a reference 
comparison
-               // which is no longer true in 2.0
-#endif
                public void IndexOf () 
                {
                        X509CertificateCollection c = new 
X509CertificateCollection ();
@@ -242,7 +237,12 @@
 
                        // works by object reference (not value)
                        X509Certificate x = new X509Certificate (cert_a);
+                       Assert ("!ReferenceEquals", !Object.ReferenceEquals 
(x509a, x));
+#if NET_2_0
+                       AssertEquals ("A-x", 0, c.IndexOf (x));
+#else
                        AssertEquals ("A-x", -1, c.IndexOf (x));
+#endif
                }
 
                [Test]
@@ -279,20 +279,26 @@
                }
 
                [Test]
+#if !NET_2_0
                [ExpectedException (typeof (ArgumentException))]
-#if NET_2_0
-               [Category ("NotWorking")]
-               // The last test depends on Equals () doing a reference 
comparison
-               // which is no longer true in 2.0
 #endif
                public void Remove_ByValue () 
                {
                        X509CertificateCollection c = new 
X509CertificateCollection ();
-                       c.Add (x509a);
-                       AssertEquals ("Read,Count==1", 1, c.Count);
+                       X509Certificate x = null;
 
-                       // works by object reference (not by value)
-                       X509Certificate x = new X509Certificate (cert_a);
+                       try {
+                               // don't fail in this block
+                               c.Add (x509a);
+                               AssertEquals ("Read,Count==1", 1, c.Count);
+
+                               // works by object reference (not by value)
+                               x = new X509Certificate (cert_a);
+                               Assert ("!ReferenceEquals", 
!Object.ReferenceEquals (x509a, x));
+                       }
+                       catch {}
+
+                       // fail here! (well for 1.x)
                        c.Remove (x);
                        AssertEquals ("Remove-by-value,Count==0", 0, c.Count);
                }

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

Reply via email to