Esempio n. 1
0
        public void GetNextAsDigit()
        {
            CharBuffer buffer = CharBuffer.FromString("c1");

            Assert.IsFalse(buffer.NextIsDigit());
            Assert.AreEqual(buffer.Get(), 'c');
            Assert.IsTrue(buffer.NextIsDigit());
            Assert.AreEqual(buffer.GetNextAsDigit(), 1);
            Assert.IsTrue(buffer.NextIsDigit());
            Assert.AreEqual(buffer.GetAsDigit(), 1);
            Assert.IsFalse(buffer.NextIsDigit());
        }