utils_test.go
package db
import "testing"
func TestDBPlaceholders(t *testing.T) {
tests := []struct {
n int
want string
}{
{0, ""},
{1, "?"},
{3, "?, ?, ?"},
}
for _, tt := range tests {
got := Placeholders(tt.n)
if got != tt.want {
t.Errorf("Placeholders(%d) = %q, want %q", tt.n, got, tt.want)
}
}
}