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

Function TestStatementNodeMarkers

pkg/sql/ast/interface_test.go:22–57  ·  view source on GitHub ↗

TestStatementNodeMarkers tests all statementNode() marker methods

(t *testing.T)

Source from the content-addressed store, hash-verified

20
21// TestStatementNodeMarkers tests all statementNode() marker methods
22func TestStatementNodeMarkers(t *testing.T) {
23 // Test all types that implement statementNode()
24 tests := []struct {
25 name string
26 stmt Statement
27 }{
28 {"WithClause", &WithClause{}},
29 {"CommonTableExpr", &CommonTableExpr{}},
30 {"SetOperation", &SetOperation{}},
31 {"TableReference", &TableReference{}},
32 {"WindowSpec", &WindowSpec{}},
33 {"WindowFrame", &WindowFrame{}},
34 {"SelectStatement", &SelectStatement{}},
35 {"InsertStatement", &InsertStatement{}},
36 {"UpdateStatement", &UpdateStatement{}},
37 {"DeleteStatement", &DeleteStatement{}},
38 {"CreateTableStatement", &CreateTableStatement{}},
39 {"AlterTableStatement", &AlterTableStatement{}},
40 {"CreateIndexStatement", &CreateIndexStatement{}},
41 {"MergeStatement", &MergeStatement{}},
42 {"CreateViewStatement", &CreateViewStatement{}},
43 {"CreateMaterializedViewStatement", &CreateMaterializedViewStatement{}},
44 {"RefreshMaterializedViewStatement", &RefreshMaterializedViewStatement{}},
45 {"DropStatement", &DropStatement{}},
46 {"TruncateStatement", &TruncateStatement{}},
47 {"Values", &Values{}},
48 }
49
50 for _, tt := range tests {
51 t.Run(tt.name, func(t *testing.T) {
52 // Call statementNode() to exercise the marker method
53 tt.stmt.statementNode()
54 // Just verify it doesn't panic - marker methods have no return value
55 })
56 }
57}
58
59// TestExpressionNodeMarkers tests all expressionNode() marker methods
60func TestExpressionNodeMarkers(t *testing.T) {

Callers

nothing calls this directly

Calls 2

RunMethod · 0.80
statementNodeMethod · 0.65

Tested by

no test coverage detected