diff options
author | Ian Hays <ianha@microsoft.com> | 2016-04-08 17:58:47 +0300 |
---|---|---|
committer | Ian Hays <ianha@microsoft.com> | 2016-04-08 17:58:47 +0300 |
commit | e1c3dbaf1fa38d7052feda7cbdc04463f4c08b90 (patch) | |
tree | 8348fe978725a06cb39ba41b70602cb1c1a226bc /src/System.IO/tests/StringReader | |
parent | 6f65e9fa022a0891e09011a1b2281c4578609e92 (diff) |
Minor changes to tests for cleanup
Diffstat (limited to 'src/System.IO/tests/StringReader')
-rw-r--r-- | src/System.IO/tests/StringReader/StringReader.CtorTests.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/System.IO/tests/StringReader/StringReader.CtorTests.cs b/src/System.IO/tests/StringReader/StringReader.CtorTests.cs index e43e1d75e6..964621db23 100644 --- a/src/System.IO/tests/StringReader/StringReader.CtorTests.cs +++ b/src/System.IO/tests/StringReader/StringReader.CtorTests.cs @@ -56,8 +56,17 @@ namespace System.IO.Tests public static void ReadLine() { string str1 = "Hello\0\t\v \\ World"; - StringReader sr = new StringReader(str1); - Assert.Equal(str1, sr.ReadLine()); + string str2 = str1 + Environment.NewLine + str1; + + using (StringReader sr = new StringReader(str1)) + { + Assert.Equal(str1, sr.ReadLine()); + } + using (StringReader sr = new StringReader(str2)) + { + Assert.Equal(str1, sr.ReadLine()); + Assert.Equal(str1, sr.ReadLine()); + } } [Fact] |