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

Function TestDefaultBehaviorUnchanged

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

Source from the content-addressed store, hash-verified

96}
97
98func TestDefaultBehaviorUnchanged(t *testing.T) {
99 // Validate() without dialect should still work (backward compatibility)
100 err := Validate("SELECT * FROM users")
101 if err != nil {
102 t.Fatalf("Validate() failed: %v", err)
103 }
104
105 ast, err := ParseBytes([]byte("SELECT 1"))
106 if err != nil {
107 t.Fatalf("ParseBytes() failed: %v", err)
108 }
109 if ast == nil {
110 t.Fatal("expected non-nil AST")
111 }
112}
113
114func TestMySQLKeywordsRecognized(t *testing.T) {
115 // UNSIGNED is a MySQL-specific keyword; tokenizer should recognize it

Callers

nothing calls this directly

Calls 3

ValidateFunction · 0.70
ParseBytesFunction · 0.70
FatalfMethod · 0.65

Tested by

no test coverage detected