Пример #1
0
        public void TestPeekBoolean()
        {
            buffer.WriteBoolean(true);
            buffer.WriteBoolean(true);

            buffer.Reset();
            Assert.AreEqual(true, buffer.PeekBoolean());
            Assert.AreEqual(true, buffer.PeekBoolean(1));

            buffer.Wipe();

            buffer.WriteBooleanArray(new bool[] { true, true, true, false, true, true, true });
            buffer.Reset();
            Assert.AreEqual(false, buffer.PeekBoolean(sizeof(byte) + 3));
            Assert.AreEqual(true, buffer.PeekBoolean(sizeof(byte) + 4));

            buffer.Wipe();
        }