diff --git a/SharpCompress.Test/TestBase.cs b/SharpCompress.Test/TestBase.cs index 75e396c8..7726dd59 100644 --- a/SharpCompress.Test/TestBase.cs +++ b/SharpCompress.Test/TestBase.cs @@ -122,14 +122,14 @@ namespace SharpCompress.Test using (var file2Stream = File.OpenRead(file2)) { Assert.AreEqual(file1Stream.Length, file2Stream.Length); - int byte1 = 0; int byte2 = 0; - while (byte1 != -1) + for (int counter = 0; byte1 != -1; counter++ ) { byte1 = file1Stream.ReadByte(); byte2 = file2Stream.ReadByte(); - Assert.AreEqual(byte1, byte2); + if (byte1 != byte2) Assert.AreEqual(byte1, byte2, string.Format("Byte {0} differ between {1} and {2}", + counter, file1, file2)); } } }