public void TestMatchEmpty() { var RleMatcher = new RleMatcher(new byte[] { }); Assert.AreEqual(0, RleMatcher.Length); RleMatcher.Skip(); Assert.AreEqual(0, RleMatcher.Length); }
public void TestMatch3() { var RleMatcher = new RleMatcher(new byte[] { 1, 1, 1 }); Assert.AreEqual(1, RleMatcher.Byte); Assert.AreEqual(3, RleMatcher.Length); RleMatcher.Skip(); Assert.AreEqual(1, RleMatcher.Byte); Assert.AreEqual(2, RleMatcher.Length); RleMatcher.Skip(); Assert.AreEqual(1, RleMatcher.Byte); Assert.AreEqual(1, RleMatcher.Length); RleMatcher.Skip(); Assert.AreEqual(1, RleMatcher.Byte); Assert.AreEqual(0, RleMatcher.Length); RleMatcher.Skip(); Assert.AreEqual(1, RleMatcher.Byte); Assert.AreEqual(0, RleMatcher.Length); }
public void TestMatch3() { byte bb = 77; var rleMatcher = new RleMatcher(new[] { bb, bb, bb }); Assert.Equal(bb, rleMatcher.Byte); Assert.Equal(3, rleMatcher.Length); rleMatcher.Skip(); Assert.Equal(bb, rleMatcher.Byte); Assert.Equal(2, rleMatcher.Length); rleMatcher.Skip(); Assert.Equal(bb, rleMatcher.Byte); Assert.Equal(1, rleMatcher.Length); rleMatcher.Skip(); Assert.Equal(bb, rleMatcher.Byte); Assert.Equal(0, rleMatcher.Length); rleMatcher.Skip(); Assert.Equal(bb, rleMatcher.Byte); Assert.Equal(0, rleMatcher.Length); }