public void SkipBytesTest() { var pr = new PtrReader(m_buffer, 10); Assert.Catch(typeof(InvalidOperationException), () => { pr.SkipBytes(11); }); pr.SkipBytes(10); Assert.AreEqual(10, pr.Offset); }
public void TryRead() { var br = new PtrReader(m_buffer, 64); Assert.AreEqual(true, br.TryRead(out int value)); br.SkipBytes(60); Assert.AreEqual(false, br.TryRead(out int valu2)); }