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); }
public void EmptyQueriesShouldJustReturnEndOfInput(string q) { var qs = new QueryScanner(); qs.Init(q); Assert.False(qs.Identifier()); }
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); }