1 package main 2 3 import "testing" 4 5 func TestSelectExpr(t *testing.T) { 6 columns := []string{"from", "to", "date", "subject"} 7 want := "IN (?, ?, ?, ?)" 8 got := sqlInExpr(len(columns)) 9 if want != got { 10 t.Errorf("want %s, got %s", want, got) 11 } 12 }