mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
More code cleanup after decoding optimization
This commit is contained in:
@@ -80,6 +80,23 @@ namespace CUETools.TestCodecs
|
||||
Assert.AreEqual<uint>(crcA, Crc32.Substract(crcAB, crcB, lenB), "CRC32 was not substracted correctly.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///A test for Combine
|
||||
///</summary>
|
||||
[TestMethod()]
|
||||
public void CombineTest16()
|
||||
{
|
||||
int lenAB = testBytes.Length;
|
||||
int lenA = 7;
|
||||
int lenB = lenAB - lenA;
|
||||
ushort crcAB = Crc16.ComputeChecksum(0, testBytes, 0, lenAB);
|
||||
ushort crcA = Crc16.ComputeChecksum(0, testBytes, 0, lenA);
|
||||
ushort crcB = Crc16.ComputeChecksum(0, testBytes, lenA, lenB);
|
||||
Assert.AreEqual<uint>(crcAB, Crc16.Combine(crcA, crcB, lenB), "CRC16 was not combined correctly.");
|
||||
Assert.AreEqual<uint>(crcB, Crc16.Combine(crcA, crcAB, lenB), "CRC16 was not substracted correctly.");
|
||||
Assert.AreEqual<uint>(crcA, Crc16.Substract(crcAB, crcB, lenB), "CRC16 was not substracted correctly.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///A test for ComputeChecksum
|
||||
///</summary>
|
||||
|
||||
Reference in New Issue
Block a user