----------------------------------------------------------------------------- TestDeleteStatementPosition verifies DELETE statement position -----------------------------------------------------------------------------
(t *testing.T)
| 159 | // ----------------------------------------------------------------------------- |
| 160 | |
| 161 | func TestDeleteStatementPosition(t *testing.T) { |
| 162 | tree := parseWithPositions(t, "DELETE FROM users WHERE id = 1") |
| 163 | |
| 164 | if len(tree.Statements) != 1 { |
| 165 | t.Fatalf("expected 1 statement, got %d", len(tree.Statements)) |
| 166 | } |
| 167 | |
| 168 | del, ok := tree.Statements[0].(*ast.DeleteStatement) |
| 169 | if !ok { |
| 170 | t.Fatalf("expected *ast.DeleteStatement, got %T", tree.Statements[0]) |
| 171 | } |
| 172 | |
| 173 | assertPosEqual(t, "DELETE.Pos", del.Pos, 1, 1) |
| 174 | } |
| 175 | |
| 176 | // ----------------------------------------------------------------------------- |
| 177 | // TestIdentifierPosition verifies Identifier nodes carry positions |
nothing calls this directly
no test coverage detected