TestExpressionNodeMarkers tests all expressionNode() marker methods
(t *testing.T)
| 58 | |
| 59 | // TestExpressionNodeMarkers tests all expressionNode() marker methods |
| 60 | func TestExpressionNodeMarkers(t *testing.T) { |
| 61 | tests := []struct { |
| 62 | name string |
| 63 | expr Expression |
| 64 | }{ |
| 65 | {"JoinClause", &JoinClause{}}, |
| 66 | {"OrderByExpression", &OrderByExpression{}}, |
| 67 | {"WindowFrameBound", &WindowFrameBound{}}, |
| 68 | {"FetchClause", &FetchClause{}}, |
| 69 | {"RollupExpression", &RollupExpression{}}, |
| 70 | {"CubeExpression", &CubeExpression{}}, |
| 71 | {"GroupingSetsExpression", &GroupingSetsExpression{}}, |
| 72 | {"Identifier", &Identifier{}}, |
| 73 | {"FunctionCall", &FunctionCall{}}, |
| 74 | {"CaseExpression", &CaseExpression{}}, |
| 75 | {"WhenClause", &WhenClause{}}, |
| 76 | {"ExistsExpression", &ExistsExpression{}}, |
| 77 | {"InExpression", &InExpression{}}, |
| 78 | {"SubqueryExpression", &SubqueryExpression{}}, |
| 79 | {"AnyExpression", &AnyExpression{}}, |
| 80 | {"AllExpression", &AllExpression{}}, |
| 81 | {"BetweenExpression", &BetweenExpression{}}, |
| 82 | {"BinaryExpression", &BinaryExpression{}}, |
| 83 | {"LiteralValue", &LiteralValue{}}, |
| 84 | {"ListExpression", &ListExpression{}}, |
| 85 | {"UnaryExpression", &UnaryExpression{}}, |
| 86 | {"CastExpression", &CastExpression{}}, |
| 87 | {"ExtractExpression", &ExtractExpression{}}, |
| 88 | {"PositionExpression", &PositionExpression{}}, |
| 89 | {"SubstringExpression", &SubstringExpression{}}, |
| 90 | {"OnConflict", &OnConflict{}}, |
| 91 | {"UpsertClause", &UpsertClause{}}, |
| 92 | {"ColumnDef", &ColumnDef{}}, |
| 93 | {"ColumnConstraint", &ColumnConstraint{}}, |
| 94 | {"TableConstraint", &TableConstraint{}}, |
| 95 | {"ReferenceDefinition", &ReferenceDefinition{}}, |
| 96 | {"PartitionBy", &PartitionBy{}}, |
| 97 | {"TableOption", &TableOption{}}, |
| 98 | {"UpdateExpression", &UpdateExpression{}}, |
| 99 | {"AlterTableAction", &AlterTableAction{}}, |
| 100 | {"IndexColumn", &IndexColumn{}}, |
| 101 | {"MergeWhenClause", &MergeWhenClause{}}, |
| 102 | {"MergeAction", &MergeAction{}}, |
| 103 | {"SetClause", &SetClause{}}, |
| 104 | {"PartitionDefinition", &PartitionDefinition{}}, |
| 105 | } |
| 106 | |
| 107 | for _, tt := range tests { |
| 108 | t.Run(tt.name, func(t *testing.T) { |
| 109 | tt.expr.expressionNode() |
| 110 | }) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | // TestTokenLiteralMethods tests TokenLiteral() for all node types |
| 115 | func TestTokenLiteralMethods(t *testing.T) { |
nothing calls this directly
no test coverage detected