Fixes test

This commit is contained in:
mattn 2013-09-09 13:45:51 +09:00
parent f595dd9955
commit d8f315ab83
1 changed files with 11 additions and 5 deletions

View File

@ -591,10 +591,10 @@ func TestExecer(t *testing.T) {
_, err = db.Exec(`
create table foo (id integer);
insert into foo(id) values(1);
insert into foo(id) values(2);
insert into foo(id) values(3);
`)
insert into foo(id) values(?);
insert into foo(id) values(?);
insert into foo(id) values(?);
`, 1, 2, 3)
if err != nil {
t.Error("Failed to call db.Exec:", err)
}
@ -612,8 +612,14 @@ func TestQueryer(t *testing.T) {
defer os.Remove(tempFilename)
defer db.Close()
rows, err := db.Query(`
_, err = db.Exec(`
create table foo (id integer);
`)
if err != nil {
t.Error("Failed to call db.Query:", err)
}
rows, err := db.Query(`
insert into foo(id) values(?);
insert into foo(id) values(?);
insert into foo(id) values(?);