Modernised tests

Signed-off-by: Michał Matczuk <michal@scylladb.com>
This commit is contained in:
Michał Matczuk
2020-04-21 11:10:19 +02:00
committed by Michal Jan Matczuk
parent 95d96fa939
commit 33ae600ba4
3 changed files with 177 additions and 168 deletions

View File

@@ -7,7 +7,6 @@ package gocqlx_test
import (
"testing"
"github.com/gocql/gocql"
"github.com/scylladb/gocqlx"
)
@@ -19,8 +18,10 @@ func BenchmarkCompileNamedQuery(b *testing.B) {
}
}
func BenchmarkBindStruct(b *testing.B) {
q := gocqlx.Query(&gocql.Query{}, []string{"name", "age", "first", "last"})
func BenchmarkQueryxBindStruct(b *testing.B) {
q := gocqlx.Queryx{
Names: []string{"name", "age", "first", "last"},
}
type t struct {
Name string
Age int
@@ -36,7 +37,6 @@ func BenchmarkBindStruct(b *testing.B) {
func BenchmarkBindMap(b *testing.B) {
q := gocqlx.Queryx{
Query: &gocql.Query{},
Names: []string{"name", "age", "first", "last"},
}
am := map[string]interface{}{