Beispiel #1
0
        public void UTF16Test(string value)
        {
            var pw = new PtrWriter(m_buffer, 64);

            pw.WriteUTF16(value, true);

            var pr = new PtrReader(m_buffer, 64);

            Assert.AreEqual(value, pr.ReadUTF16());
            Assert.AreEqual(pr.Offset, pw.Offset);
        }
Beispiel #2
0
        public void UTF16TestLen(string value)
        {
            var pw = new PtrWriter(m_buffer, 64);

            pw.WriteUTF16(value);

            var pr = new PtrReader(m_buffer, 64);

            Assert.AreEqual(value, pr.ReadUTF16(value.Length));
            Assert.AreEqual(pr.Offset, pw.Offset);
            Assert.AreEqual(value.Length * sizeof(char), pw.Offset);
        }