Esempio n. 1
0
        public void SkipBytesTest()
        {
            var pw = new PtrWriter(m_buffer, 10);

            Assert.Catch(typeof(InvalidOperationException), () => { pw.SkipBytes(11); });
            pw.SkipBytes(10);
            Assert.AreEqual(10, pw.Offset);
        }
Esempio n. 2
0
        public void TryWrite()
        {
            var bw = new PtrWriter(m_buffer, 64);

            Assert.AreEqual(true, bw.TryWrite(123));

            bw.SkipBytes(60);
            Assert.AreEqual(false, bw.TryWrite(123));
        }