Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Dec 9, 2016
1 parent a160bbb commit 35cf400
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlite3_go18_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ func TestNamedParams(t *testing.T) {
t.Error("Failed to call db.Query:", err)
}

_, err = db.Exec(`insert into foo(id, name, extra) values(:id, :name, :name)`, sql.Named(":name", "foo"), sql.Named(":id", 1))
_, err = db.Exec(`insert into foo(id, name, extra) values(:id, :name, :name)`, sql.Named("name", "foo"), sql.Named("id", 1))
if err != nil {
t.Error("Failed to call db.Exec:", err)
}

row := db.QueryRow(`select id, extra from foo where id = :id and extra = :extra`, sql.Named(":id", 1), sql.Named(":extra", "foo"))
row := db.QueryRow(`select id, extra from foo where id = :id and extra = :extra`, sql.Named("id", 1), sql.Named("extra", "foo"))
if row == nil {
t.Error("Failed to call db.QueryRow")
}
Expand Down

0 comments on commit 35cf400

Please sign in to comment.