─── BETWEEN expression ──────────────────────────────────────────────────────
(t *testing.T)
| 903 | // ─── BETWEEN expression ────────────────────────────────────────────────────── |
| 904 | |
| 905 | func TestRenderBetween(t *testing.T) { |
| 906 | expr := &ast.BetweenExpression{ |
| 907 | Expr: &ast.Identifier{Name: "age"}, |
| 908 | Lower: &ast.LiteralValue{Value: "18"}, |
| 909 | Upper: &ast.LiteralValue{Value: "65"}, |
| 910 | } |
| 911 | result := fmtExpr(expr, ast.ReadableStyle()) |
| 912 | expected := "age BETWEEN 18 AND 65" |
| 913 | if result != expected { |
| 914 | t.Errorf("expected %q, got %q", expected, result) |
| 915 | } |
| 916 | } |
| 917 | |
| 918 | func TestRenderBetween_Not(t *testing.T) { |
| 919 | expr := &ast.BetweenExpression{ |
nothing calls this directly
no test coverage detected