Exemple #1
0
        public void CanScanConsecutiveIdentifiers(string q, int start, int len)
        {
            var qs = new QueryScanner();

            qs.Init(q);

            Assert.True(qs.Identifier());
            Assert.True(qs.Identifier());
            Assert.Equal(start, qs.TokenStart);
            Assert.Equal(len, qs.TokenLength);
        }
Exemple #2
0
        public void EmptyQueriesShouldJustReturnEndOfInput(string q)
        {
            var qs = new QueryScanner();

            qs.Init(q);

            Assert.False(qs.Identifier());
        }
Exemple #3
0
        public void IdentifierShouldBeFound(string q, int start, int len)
        {
            var qs = new QueryScanner();

            qs.Init(q);

            Assert.True(qs.Identifier());
            Assert.Equal(start, qs.TokenStart);
            Assert.Equal(len, qs.TokenLength);
        }