Example #1
0
        public void nextValTest3()
        {
            var br = new BReader(new byte[] {
                5, 0, 0, 0, // Int32 = 5
            });

            Assert.Equal(5, br.next(typeof(Int32), 4));
            br.reset();
            Assert.Equal(5, br.next(typeof(Int32), 4));

            Assert.False(br.tryNext(typeof(Int32), 4, out _));
        }
Example #2
0
        public void nextValTest3()
        {
            var br = new BReader(new byte[] {
                5, 0, 0, 0, // Int32 = 5
            });

            Assert.AreEqual(5, br.next(typeof(Int32), 4));
            br.reset();
            Assert.AreEqual(5, br.next(typeof(Int32), 4));

            dynamic value;

            Assert.AreEqual(false, br.tryNext(typeof(Int32), 4, out value));
        }