diff --git a/bench_test.go b/bench_test.go index 35192315..c5418fbb 100644 --- a/bench_test.go +++ b/bench_test.go @@ -15,12 +15,6 @@ var float4TextVsBinaryTestDataLoaded bool var float8TextVsBinaryTestDataLoaded bool var boolTextVsBinaryTestDataLoaded bool -func mustPrepare(b *testing.B, conn *Connection, name, sql string) { - if err := conn.Prepare(name, sql); err != nil { - b.Fatalf("Could not prepare %v: %v", name, err) - } -} - func createNarrowTestData(b *testing.B, conn *Connection) { if narrowTestDataLoaded { return diff --git a/helper_test.go b/helper_test.go new file mode 100644 index 00000000..bc2eb945 --- /dev/null +++ b/helper_test.go @@ -0,0 +1,11 @@ +package pgx + +type test interface { + Fatalf(format string, args ...interface{}) +} + +func mustPrepare(t test, conn *Connection, name, sql string) { + if err := conn.Prepare(name, sql); err != nil { + t.Fatalf("Could not prepare %v: %v", name, err) + } +}