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

Function TestRenderCase_LowerKeywords

pkg/formatter/render_test.go:890–901  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

888}
889
890func TestRenderCase_LowerKeywords(t *testing.T) {
891 expr := &ast.CaseExpression{
892 WhenClauses: []ast.WhenClause{
893 {Condition: &ast.LiteralValue{Value: "true"}, Result: &ast.LiteralValue{Value: "1"}},
894 },
895 }
896 opts := ast.FormatOptions{KeywordCase: ast.KeywordLower}
897 result := fmtExpr(expr, opts)
898 if !strings.Contains(result, "case") || !strings.Contains(result, "when") || !strings.Contains(result, "end") {
899 t.Errorf("expected lowercase keywords in: %s", result)
900 }
901}
902
903// ─── BETWEEN expression ──────────────────────────────────────────────────────
904

Callers

nothing calls this directly

Calls 2

fmtExprFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected