2
0
Эх сурвалжийг харах

2002-09-19 Nick Drochak <[email protected]>

	* StreamReaderTest.cs: Pinpoint error closing streams

svn path=/trunk/mcs/; revision=7620
Nick Drochak 23 жил өмнө
parent
commit
999104f3d0

+ 4 - 0
mcs/class/corlib/Test/System.IO/ChangeLog

@@ -1,3 +1,7 @@
+2002-09-19  Nick Drochak  <[email protected]>
+
+	* StreamReaderTest.cs: Pinpoint error closing streams
+
 2002-09-10  Gonzalo Paniagua Javier <[email protected]>
 
 	* FileTest.cs: don't leave AFile.txt open.

+ 4 - 1
mcs/class/corlib/Test/System.IO/StreamReaderTest.cs

@@ -343,15 +343,18 @@ public class StreamReaderTest : TestCase
 	// TODO - Ctor with Encoding
 	
 	public void TestBaseStream() {
+		string progress = "beginning";
 		try {
 			Byte[] b = {};
 			MemoryStream m = new MemoryStream(b);
 			StreamReader r = new StreamReader(m);
 			AssertEquals("wrong base stream ", m, r.BaseStream);
+			progress = "Closing StreamReader";
 			r.Close();
+			progress = "Closing MemoryStream";
 			m.Close();
 		} catch (Exception e) {
-			Fail ("Unexpected exception thrown: " + e.ToString());
+			Fail ("At '" + progress + "' an unexpected exception was thrown: " + e.ToString());
 		}
 	}