----------------------------------------------------------------------------- TestArithmeticBinaryExpressionPosition verifies positions in arithmetic -----------------------------------------------------------------------------
(t *testing.T)
| 406 | // ----------------------------------------------------------------------------- |
| 407 | |
| 408 | func TestArithmeticBinaryExpressionPosition(t *testing.T) { |
| 409 | tree := parseWithPositions(t, "SELECT price * 1.1 FROM products") |
| 410 | |
| 411 | sel := tree.Statements[0].(*ast.SelectStatement) |
| 412 | if len(sel.Columns) == 0 { |
| 413 | t.Fatal("expected columns") |
| 414 | } |
| 415 | |
| 416 | binExpr, ok := sel.Columns[0].(*ast.BinaryExpression) |
| 417 | if !ok { |
| 418 | t.Fatalf("expected *ast.BinaryExpression, got %T", sel.Columns[0]) |
| 419 | } |
| 420 | |
| 421 | assertPos(t, "BinaryExpression(*).Pos", binExpr.Pos) |
| 422 | } |
nothing calls this directly
no test coverage detected