─── IN expression ────────────────────────────────────────────────────────────
(t *testing.T)
| 938 | // ─── IN expression ──────────────────────────────────────────────────────────── |
| 939 | |
| 940 | func TestRenderIn_Values(t *testing.T) { |
| 941 | expr := &ast.InExpression{ |
| 942 | Expr: &ast.Identifier{Name: "id"}, |
| 943 | List: []ast.Expression{&ast.LiteralValue{Value: "1"}, &ast.LiteralValue{Value: "2"}, &ast.LiteralValue{Value: "3"}}, |
| 944 | } |
| 945 | result := fmtExpr(expr, ast.ReadableStyle()) |
| 946 | expected := "id IN (1, 2, 3)" |
| 947 | if result != expected { |
| 948 | t.Errorf("expected %q, got %q", expected, result) |
| 949 | } |
| 950 | } |
| 951 | |
| 952 | func TestRenderIn_Not(t *testing.T) { |
| 953 | expr := &ast.InExpression{ |
nothing calls this directly
no test coverage detected