package storage import "testing" func TestInPlaceholdersUsesScalarList(t *testing.T) { tests := []struct { name string count int want string }{ {name: "single", count: 1, want: "(?)"}, {name: "multiple", count: 3, want: "(?,?,?)"}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if got := inPlaceholders(tt.count); got != tt.want { t.Fatalf("inPlaceholders(%d) = %q, want %q", tt.count, got, tt.want) } if got := inStringPlaceholders(tt.count); got != tt.want { t.Fatalf("inStringPlaceholders(%d) = %q, want %q", tt.count, got, tt.want) } }) } }