We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00c3c91 commit 661f5d2Copy full SHA for 661f5d2
1 file changed
ICSharpCode.SharpZipLib.Tests/GZip/GZipTests.cs
@@ -100,13 +100,18 @@ public void ZeroLengthInputStream()
100
{
101
var gzi = new GZipInputStream(new MemoryStream());
102
bool exception = false;
103
- try {
104
- gzi.ReadByte();
105
- } catch {
+ int retval = int.MinValue;
+ try
+ {
106
+ retval = gzi.ReadByte();
107
+ }
108
+ catch
109
110
exception = true;
111
}
112
- Assert.IsTrue(exception, "reading from an empty stream should cause an exception");
113
+ Assert.IsFalse(exception, "reading from an empty stream should not cause an exception");
114
+ Assert.That(retval, Is.EqualTo(-1), "should yield -1 byte value");
115
116
117
[Test]
0 commit comments