MCPcopy Create free account
hub / github.com/araddon/qlbridge / verifyTokenTypes

Function verifyTokenTypes

lex/lexer_test.go:265–273  ·  view source on GitHub ↗
(t *testing.T, sql string, tt []TokenType)

Source from the content-addressed store, hash-verified

263}
264
265func verifyTokenTypes(t *testing.T, sql string, tt []TokenType) {
266 l := NewSqlLexer(sql)
267 u.Debug(sql)
268 for _, tokenType := range tt {
269 tok := l.NextToken()
270 //u.Infof("%#v expects:%v", tok, tokenType)
271 assert.Equal(t, tok.T, tokenType, "want='%v' has %v ", tokenType, tok.T)
272 }
273}
274
275func lexTokens(sql string) []Token {
276 tokens := make([]Token, 0)

Callers 6

TestLexSqlShowFunction · 0.85
TestLexGreedyUdfFunction · 0.85
TestLexUdfSpecialAsFunction · 0.85
TestLexSqlJoinFunction · 0.85
TestLexSqlSubQueryFunction · 0.85
TestWithJsonFunction · 0.85

Calls 3

NewSqlLexerFunction · 0.85
NextTokenMethod · 0.80
EqualMethod · 0.65

Tested by

no test coverage detected