mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Improved Unit Test for BitWriter
This commit is contained in:
@@ -85,6 +85,7 @@ namespace CUETools.TestCodecs
|
|||||||
}
|
}
|
||||||
while (target.Length < buf.Length - 32);
|
while (target.Length < buf.Length - 32);
|
||||||
target.flush();
|
target.flush();
|
||||||
|
ushort c1 = target.get_crc16(), c2;
|
||||||
rnd = new Random(seed);
|
rnd = new Random(seed);
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
@@ -98,8 +99,11 @@ namespace CUETools.TestCodecs
|
|||||||
ulong val1 = reader.readbits64(bits);
|
ulong val1 = reader.readbits64(bits);
|
||||||
Assert.AreEqual(val, val1, string.Format("i = {0}, bits = {1}, seed = {2}, pos = {3}", i, bits, seed, reader.Position));
|
Assert.AreEqual(val, val1, string.Format("i = {0}, bits = {1}, seed = {2}, pos = {3}", i, bits, seed, reader.Position));
|
||||||
}
|
}
|
||||||
|
reader.flush();
|
||||||
|
c2 = reader.get_crc16();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Assert.AreEqual(c1, c2, string.Format("seed = {0}", seed));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user