}
if len(columnNames) != len(columnTypes) {
return fmt.Errorf("create table of %q len(names) != len(types): %d vs %d",
- len(columnNames), len(columnTypes))
+ name, len(columnNames), len(columnTypes))
}
db.tables[name] = &table{colname: columnNames, coltype: columnTypes}
return nil
if err := stmt.QueryRow(tt.name).Scan(&age); err != nil {
t.Errorf("%d: on %q, QueryRow/Scan: %v", n, tt.name, err)
} else if age != tt.want {
- t.Errorf("%d: age=%d, want %d", age, tt.want)
+ t.Errorf("%d: age=%d, want %d", n, age, tt.want)
}
}
func TestEscapeSetErrorsNotIgnorable(t *testing.T) {
s, err := (&template.Set{}).Parse(`{{define "t"}}<a{{end}}`)
if err != nil {
- t.Error("failed to parse set: %q", err)
+ t.Errorf("failed to parse set: %q", err)
}
EscapeSet(s, "t")
var b bytes.Buffer
t.Fatalf("delim %q exec err %s", left, err)
}
if b.String() != hello+trueLeft {
- t.Error("expected %q got %q", hello+trueLeft, b.String())
+ t.Errorf("expected %q got %q", hello+trueLeft, b.String())
}
}
}