2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / mcs / class / corlib / Test / System.Security.Cryptography / CryptoStreamTest.cs
index 3dd3b76999a01e983ec8e406f5e41828d4e39ebc..fbf2264281b2024cf61d2f957b9f551b439d3568 100644 (file)
@@ -225,8 +225,8 @@ namespace MonoTests.System.Security.Cryptography {
                [Test]
                [ExpectedException (typeof (NotSupportedException))]
                public void GetLength () 
-               {\r
-                       DebugStream debug = new DebugStream ();\r
+               {
+                       DebugStream debug = new DebugStream ();
                        cs = new CryptoStream (debug, encryptor, CryptoStreamMode.Read);
                        long x = cs.Length;
                }
@@ -234,35 +234,35 @@ namespace MonoTests.System.Security.Cryptography {
                [Test]
                [ExpectedException (typeof (NotSupportedException))]
                public void GetPosition () 
-               {\r
-                       DebugStream debug = new DebugStream ();\r
+               {
+                       DebugStream debug = new DebugStream ();
                        cs = new CryptoStream (debug, encryptor, CryptoStreamMode.Read);
                        long x = cs.Position;
                }
 
-               [Test]\r
-               [ExpectedException (typeof (NotSupportedException))]\r
+               [Test]
+               [ExpectedException (typeof (NotSupportedException))]
                public void SetPosition () 
-               {\r
-                       DebugStream debug = new DebugStream ();\r
+               {
+                       DebugStream debug = new DebugStream ();
                        cs = new CryptoStream (debug, encryptor, CryptoStreamMode.Read);
                        cs.Position = 1;
                }
 
-               [Test]\r
-               [ExpectedException (typeof (NotSupportedException))]\r
+               [Test]
+               [ExpectedException (typeof (NotSupportedException))]
                public void Seek () 
-               {\r
-                       DebugStream debug = new DebugStream ();\r
+               {
+                       DebugStream debug = new DebugStream ();
                        cs = new CryptoStream (debug, encryptor, CryptoStreamMode.Read);
                        cs.Seek (0, SeekOrigin.Begin);
                }
 
-               [Test]\r
-               [ExpectedException (typeof (NotSupportedException))]\r
+               [Test]
+               [ExpectedException (typeof (NotSupportedException))]
                public void SetLength () 
-               {\r
-                       DebugStream debug = new DebugStream ();\r
+               {
+                       DebugStream debug = new DebugStream ();
                        cs = new CryptoStream (debug, encryptor, CryptoStreamMode.Read);
                        cs.SetLength (0);
                }
@@ -287,8 +287,8 @@ namespace MonoTests.System.Security.Cryptography {
                [ExpectedException (typeof (NotSupportedException))]
                public void FlushFinalBlock_Dual () 
                {
-                       // do no corrupt writeStream in further tests\r
-                       using (Stream s = new MemoryStream ()) {\r
+                       // do no corrupt writeStream in further tests
+                       using (Stream s = new MemoryStream ()) {
                                byte[] data = {0, 1, 2, 3, 4, 5, 6, 7};
                                cs = new CryptoStream (s, encryptor, CryptoStreamMode.Write);
                                cs.Write (data, 0, data.Length);
@@ -297,13 +297,13 @@ namespace MonoTests.System.Security.Cryptography {
                        }
                }
 
-               [Test]\r
+               [Test]
                // LAMESPEC or MS BUG [ExpectedException (typeof (ObjectDisposedException))]
                [ExpectedException (typeof (ArgumentNullException))]
                public void FlushFinalBlock_Disposed () 
-               {\r
-                       // do no corrupt writeStream in further tests\r
-                       using (Stream s = new MemoryStream ()) {\r
+               {
+                       // do no corrupt writeStream in further tests
+                       using (Stream s = new MemoryStream ()) {
                                cs = new CryptoStream (s, encryptor, CryptoStreamMode.Write);
                                cs.Clear ();
                                cs.FlushFinalBlock ();
@@ -314,9 +314,9 @@ namespace MonoTests.System.Security.Cryptography {
                // LAMESPEC or MS BUG [ExpectedException (typeof (ObjectDisposedException))]
                [ExpectedException (typeof (ArgumentNullException))]
                public void Read_Disposed () 
-               {\r
-                       // do no corrupt readStream in further tests\r
-                       using (Stream s = new MemoryStream ()) {\r
+               {
+                       // do no corrupt readStream in further tests
+                       using (Stream s = new MemoryStream ()) {
                                byte[] buffer = new byte [8];
                                cs = new CryptoStream (s, encryptor, CryptoStreamMode.Read);
                                cs.Clear ();
@@ -334,9 +334,9 @@ namespace MonoTests.System.Security.Cryptography {
                [ExpectedException (typeof (ArgumentNullException))] // should fail like previous test case
 #endif
                public void Read_Disposed_Break () 
-               {\r
-                       // do no corrupt readStream in further tests\r
-                       using (Stream s = new MemoryStream ()) {\r
+               {
+                       // do no corrupt readStream in further tests
+                       using (Stream s = new MemoryStream ()) {
                                byte[] buffer = new byte [8];
                                cs = new CryptoStream (s, encryptor, CryptoStreamMode.Read);
                                int len = cs.Read (buffer, 0, 4);
@@ -346,8 +346,8 @@ namespace MonoTests.System.Security.Cryptography {
                        }
                }
 
-               [Test]\r
-               [ExpectedException (typeof (NotSupportedException))]\r
+               [Test]
+               [ExpectedException (typeof (NotSupportedException))]
                public void Read_WriteStream () 
                {
                        cs = new CryptoStream (writeStream, encryptor, CryptoStreamMode.Write);
@@ -355,7 +355,7 @@ namespace MonoTests.System.Security.Cryptography {
                        cs.Read (buffer, 0, 8);
                }
 
-               [Test]\r
+               [Test]
                [ExpectedException (typeof (NullReferenceException))]
                public void Read_NullBuffer () 
                {
@@ -363,7 +363,7 @@ namespace MonoTests.System.Security.Cryptography {
                        cs.Read (null, 0, 8);
                }
 
-               [Test]\r
+               [Test]
                public void Read_EmptyBuffer_ZeroCount () 
                {
                        byte[] buffer = new byte [0];
@@ -381,7 +381,7 @@ namespace MonoTests.System.Security.Cryptography {
                        cs.Read (buffer, -1, 8);
                }
 
-               [Test]\r
+               [Test]
                public void Read_ZeroCount () 
                {
                        byte[] buffer = new byte [8];
@@ -436,9 +436,9 @@ namespace MonoTests.System.Security.Cryptography {
                [ExpectedException (typeof (ArgumentNullException))] // to match exception throw by Read in a similar case
 #endif
                public void Write_Disposed () 
-               {\r
-                       // do no corrupt writeStream in further tests\r
-                       using (Stream s = new MemoryStream ()) {\r
+               {
+                       // do no corrupt writeStream in further tests
+                       using (Stream s = new MemoryStream ()) {
                                byte[] buffer = new byte [8];
                                cs = new CryptoStream (s, encryptor, CryptoStreamMode.Write);
                                cs.Clear ();
@@ -446,8 +446,8 @@ namespace MonoTests.System.Security.Cryptography {
                        }
                }
 
-               [Test]\r
-               [ExpectedException (typeof (NotSupportedException))]\r
+               [Test]
+               [ExpectedException (typeof (NotSupportedException))]
                public void Write_ReadStream () 
                {
                        cs = new CryptoStream (readStream, encryptor, CryptoStreamMode.Read);
@@ -463,7 +463,7 @@ namespace MonoTests.System.Security.Cryptography {
                        cs.Write (null, 0, 8);
                }
 
-               [Test]\r
+               [Test]
                public void Write_EmptyBuffer_ZeroCount () 
                {
                        byte[] buffer = new byte [0];
@@ -509,8 +509,8 @@ namespace MonoTests.System.Security.Cryptography {
                [Test]
                [ExpectedException (typeof (ArgumentException))]
                public void Write_InvalidOffset () 
-               {\r
-                       DebugStream debug = new DebugStream ();\r
+               {
+                       DebugStream debug = new DebugStream ();
                        byte[] buffer = new byte [8];
                        cs = new CryptoStream (debug, encryptor, CryptoStreamMode.Write);
                        cs.Write (buffer, 5, 4);
@@ -519,8 +519,8 @@ namespace MonoTests.System.Security.Cryptography {
                [Test]
                [ExpectedException (typeof (ArgumentException))]
                public void Write_OverflowCount () 
-               {\r
-                       DebugStream debug = new DebugStream ();\r
+               {
+                       DebugStream debug = new DebugStream ();
                        byte[] buffer = new byte [8];
                        cs = new CryptoStream (debug, encryptor, CryptoStreamMode.Write);
                        cs.Write (buffer, 0, Int32.MaxValue);