public void PeekLong(int value) { const uint min = 0, max = 500; m_stream.WriteUInt32((uint)value, min, max); m_stream.ResetRead(); Assert.AreEqual(value, m_stream.PeekUInt32(min, max)); Assert.AreEqual(0, m_stream.BitOffset); }
public void BuilderTest() { const uint uintVal = 598135039; const long longVal = 1234567890; const char charVal = '@'; const decimal decVal = (decimal)(System.Math.PI * System.Math.E); m_stream .WriteUInt32(uintVal) .WriteLong(longVal) .WriteChar(charVal) .WriteDecimal(decVal) .ResetRead(); Assert.AreEqual(SerializationMode.Reading, m_stream.Mode); Assert.AreEqual(uintVal, m_stream.ReadUInt32()); Assert.AreEqual(longVal, m_stream.ReadLong()); Assert.AreEqual(charVal, m_stream.ReadChar()); Assert.AreEqual(decVal, m_stream.ReadDecimal()); }