MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestTokenizerSetDialect

Function TestTokenizerSetDialect

pkg/sql/parser/dialect_test.go:47–55  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

45}
46
47func TestTokenizerSetDialect(t *testing.T) {
48 tkz := tokenizer.GetTokenizer()
49 defer tokenizer.PutTokenizer(tkz)
50
51 tkz.SetDialect(keywords.DialectMySQL)
52 if tkz.Dialect() != keywords.DialectMySQL {
53 t.Errorf("expected mysql, got %s", tkz.Dialect())
54 }
55}
56
57func TestTokenizerDefaultDialect(t *testing.T) {
58 tkz, err := tokenizer.NewWithDialect("")

Callers

nothing calls this directly

Calls 5

GetTokenizerFunction · 0.92
PutTokenizerFunction · 0.92
SetDialectMethod · 0.80
ErrorfMethod · 0.65
DialectMethod · 0.45

Tested by

no test coverage detected