Exemple #1
0
        public void SkipTest()
        {
            var stream = new FastStreamReader(new byte[10]);

            Assert.Equal(0, stream.GetCurrentIndex());

            stream.Skip(0);
            Assert.Equal(0, stream.GetCurrentIndex());

            stream.Skip(1);
            Assert.Equal(1, stream.GetCurrentIndex());

            stream.Skip(4);
            Assert.Equal(5, stream.GetCurrentIndex());

            stream.Skip(7);
            Assert.Equal(12, stream.GetCurrentIndex());

            Assert.False(stream.CheckRemaining(1));
        }