예제 #1
0
 public void Crc24_OfStreamWithInitialValue_IsCorrect()
 {
     using (var testData = new MemoryStream(new byte[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }))
     {
         testData.Seek(0, SeekOrigin.Begin);
         var crc24 = Crc24.OfStream(testData, Crc24.InitialValue);
         Assert.Equal(0x004F40DAu, crc24);
     }
 }
예제 #2
0
 public void Crc24_OfNullStream_ThrowsNullReferenceException()
 {
     Assert.Throws <System.NullReferenceException>(() => Crc24.OfStream(null, 0));
 }