示例#1
0
        public void PeekEmptyFifoReturnsFalse()
        {
            var           fifo = new FifoBuffer <KeyboardEvent>(5);
            KeyboardEvent result;

            Assert.IsFalse(fifo.Peek(out result));
        }
示例#2
0
        public void PeekNonEmptyFifoReturnsTrue()
        {
            var fifo = new FifoBuffer <int>(5);

            fifo.Write(99);
            int result;

            Assert.IsTrue(fifo.Peek(out result));
            Assert.AreEqual(99, result);
        }