public void UTF16Fast() { stream.ResetWrite(m_ptrBuf, SIZE); const string str = "4Jzqh8Jb4DRlTHFjHZfAO6vRVBVLnHxEfY4Ir9lNkbRN00tn6dtRneKOKsss15PEIex"; stream.WriteString(str, BitEncoding.UTF16); stream.ResetRead(); var replica = stream.ReadString(BitEncoding.UTF16); }
public void ASCIITest(string value) { m_stream.WriteString(value, Encoding.ASCII); Assert.AreEqual(sizeof(ushort) + value.Length, m_stream.ByteOffset); m_stream.ResetRead(); Assert.AreEqual(value, m_stream.ReadString(Encoding.ASCII)); }