MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestRenderIn_Values

Function TestRenderIn_Values

pkg/formatter/render_test.go:940–950  ·  view source on GitHub ↗

─── IN expression ────────────────────────────────────────────────────────────

(t *testing.T)

Source from the content-addressed store, hash-verified

938// ─── IN expression ────────────────────────────────────────────────────────────
939
940func 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
952func TestRenderIn_Not(t *testing.T) {
953 expr := &ast.InExpression{

Callers

nothing calls this directly

Calls 3

ReadableStyleFunction · 0.92
fmtExprFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected