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

Function TestAST_SQL_Method

pkg/sql/ast/sql_test.go:277–286  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

275}
276
277func TestAST_SQL_Method(t *testing.T) {
278 a := AST{Statements: []Statement{
279 &SelectStatement{Columns: []Expression{&Identifier{Name: "1"}}},
280 &SelectStatement{Columns: []Expression{&Identifier{Name: "2"}}},
281 }}
282 want := "SELECT 1;\nSELECT 2"
283 if got := a.SQL(); got != want {
284 t.Errorf("SQL() = %q, want %q", got, want)
285 }
286}
287
288func intPtr(i int) *int { return &i }

Callers

nothing calls this directly

Calls 2

SQLMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected