Author: spouliot
Date: 2007-03-22 11:48:34 -0500 (Thu, 22 Mar 2007)
New Revision: 74818

Modified:
   trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog
   trunk/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs
Log:
2007-03-22  Sebastien Pouliot  <[EMAIL PROTECTED]> 
        * CryptoStreamTest.cs: Fixed some test cases to work properly on MS
        fx 2.0.


Modified: trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog  
2007-03-22 16:48:06 UTC (rev 74817)
+++ trunk/mcs/class/corlib/Test/System.Security.Cryptography/ChangeLog  
2007-03-22 16:48:34 UTC (rev 74818)
@@ -1,7 +1,9 @@
-2007-03-22  Sebastien Pouliot  <[EMAIL PROTECTED]>
+2007-03-22  Sebastien Pouliot  <[EMAIL PROTECTED]> 
 
        * CryptoConfigTest.cs: Fix upper/lower/mixed cases tests as they work 
        only for 2.0.
+       * CryptoStreamTest.cs: Fixed some test cases to work properly on MS
+       fx 2.0.
 
 2007-03-15 Roei Erez <[EMAIL PROTECTED]>
 

Modified: 
trunk/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs
===================================================================
--- 
trunk/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs    
    2007-03-22 16:48:06 UTC (rev 74817)
+++ 
trunk/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs    
    2007-03-22 16:48:34 UTC (rev 74818)
@@ -276,7 +276,9 @@
                }
 
                [Test]
+#if ONLY_1_1
                [ExpectedException (typeof (NotSupportedException))]
+#endif
                public void FlushFinalBlockReadStream () 
                {
                        cs = new CryptoStream (readStream, encryptor, 
CryptoStreamMode.Read);
@@ -299,7 +301,11 @@
 
                [Test]
                // LAMESPEC or MS BUG [ExpectedException (typeof 
(ObjectDisposedException))]
+#if NET_2_0
+               [ExpectedException (typeof (NotSupportedException))]
+#else
                [ExpectedException (typeof (ArgumentNullException))]
+#endif
                public void FlushFinalBlock_Disposed () 
                {
                        // do no corrupt writeStream in further tests
@@ -312,7 +318,9 @@
 
                [Test]
                // LAMESPEC or MS BUG [ExpectedException (typeof 
(ObjectDisposedException))]
+#if ONLY_1_1
                [ExpectedException (typeof (ArgumentNullException))]
+#endif
                public void Read_Disposed () 
                {
                        // do no corrupt readStream in further tests
@@ -320,7 +328,7 @@
                                byte[] buffer = new byte [8];
                                cs = new CryptoStream (s, encryptor, 
CryptoStreamMode.Read);
                                cs.Clear ();
-                               cs.Read (buffer, 0, 8);
+                               AssertEquals ("Read from disposed", 0, cs.Read 
(buffer, 0, 8));
                        }
                }
 

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

Reply via email to