Exemplo n.º 1
0
        public void TestReadWhile()
        {
            SeekableStringReader s = new SeekableStringReader("123.456 foo");

            Assert.AreEqual("123.456", s.ReadWhile('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.'));
            Assert.AreEqual("", s.ReadWhile('@'));
            Assert.AreEqual(" ", s.ReadWhile(' '));
            Assert.AreEqual("foo", s.Rest());
        }
Exemplo n.º 2
0
        public void TestReadWhile()
        {
            SeekableStringReader s = new SeekableStringReader("123.456 foo");

            Assert.AreEqual("123.456", s.ReadWhile("0123456789."));
            Assert.AreEqual("", s.ReadWhile("@"));
            Assert.AreEqual(" ", s.ReadWhile(" "));
            Assert.AreEqual("foo", s.Rest());
        }