Add benchmark tests. As used by other database/sql drivers.

This commit is contained in:
Tim O'Brien
2013-09-18 19:56:03 +12:00
parent d0ce1a1784
commit a2f69308b3
2 changed files with 423 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
package sqlite3
import (
"./sqltest"
"crypto/rand"
"database/sql"
"encoding/hex"
@@ -626,6 +627,16 @@ func TestWAL(t *testing.T) {
}
}
func TestSuite(t *testing.T) {
db, err := sql.Open("sqlite3", ":memory:")
if err != nil {
t.Fatal(err)
}
defer db.Close()
sqltest.RunTests(t, db, sqltest.SQLITE)
}
// TODO: Execer & Queryer currently disabled
// https://github.com/mattn/go-sqlite3/issues/82
//func TestExecer(t *testing.T) {