@@ -83,7 +83,7 @@ type serverScriptTestAssertion struct {
83
83
expectedRows []any
84
84
85
85
// can't avoid writing custom comparator because of how gosql.Rows.Scan() works
86
- checkRows func (rows * gosql.Rows , expectedRows []any ) (bool , error )
86
+ checkRows func (t * testing. T , rows * gosql.Rows , expectedRows []any ) (bool , error )
87
87
}
88
88
89
89
type serverScriptTest struct {
@@ -108,7 +108,7 @@ func TestServerPreparedStatements(t *testing.T) {
108
108
expectedRows : []any {
109
109
[]float64 {321.4 },
110
110
},
111
- checkRows : func (rows * gosql.Rows , expectedRows []any ) (bool , error ) {
111
+ checkRows : func (t * testing. T , rows * gosql.Rows , expectedRows []any ) (bool , error ) {
112
112
var i float64
113
113
var rowNum int
114
114
for rows .Next () {
@@ -133,7 +133,7 @@ func TestServerPreparedStatements(t *testing.T) {
133
133
[]float64 {213.4 },
134
134
[]float64 {213.4 },
135
135
},
136
- checkRows : func (rows * gosql.Rows , expectedRows []any ) (bool , error ) {
136
+ checkRows : func (t * testing. T , rows * gosql.Rows , expectedRows []any ) (bool , error ) {
137
137
var i float64
138
138
var rowNum int
139
139
for rows .Next () {
@@ -197,7 +197,7 @@ func TestServerPreparedStatements(t *testing.T) {
197
197
[]uint64 {uint64 (math .MaxInt64 + 1 )},
198
198
[]uint64 {uint64 (math .MaxUint64 )},
199
199
},
200
- checkRows : func (rows * gosql.Rows , expectedRows []any ) (bool , error ) {
200
+ checkRows : func (t * testing. T , rows * gosql.Rows , expectedRows []any ) (bool , error ) {
201
201
var i uint64
202
202
var rowNum int
203
203
for rows .Next () {
@@ -247,7 +247,7 @@ func TestServerPreparedStatements(t *testing.T) {
247
247
[]int64 {int64 (- 1 )},
248
248
[]int64 {int64 (math .MaxInt64 )},
249
249
},
250
- checkRows : func (rows * gosql.Rows , expectedRows []any ) (bool , error ) {
250
+ checkRows : func (t * testing. T , rows * gosql.Rows , expectedRows []any ) (bool , error ) {
251
251
var i int64
252
252
var rowNum int
253
253
for rows .Next () {
@@ -275,12 +275,12 @@ func TestServerPreparedStatements(t *testing.T) {
275
275
},
276
276
assertions : []serverScriptTestAssertion {
277
277
{
278
- query : "select * from test where c0 = 2 and c1 = 3;" ,
278
+ query : "select * from test where c0 = 2 and c1 = 3 order by pk ;" ,
279
279
expectedRows : []any {
280
280
[]uint64 {uint64 (2 ), uint64 (3 ), uint64 (1 )},
281
281
[]uint64 {uint64 (2 ), uint64 (3 ), uint64 (7 )},
282
282
},
283
- checkRows : func (rows * gosql.Rows , expectedRows []any ) (bool , error ) {
283
+ checkRows : func (t * testing. T , rows * gosql.Rows , expectedRows []any ) (bool , error ) {
284
284
var c0 , c1 , pk uint64
285
285
var rowNum int
286
286
for rows .Next () {
@@ -363,7 +363,7 @@ func TestServerPreparedStatements(t *testing.T) {
363
363
} else {
364
364
require .NoError (t , err )
365
365
}
366
- ok , err := assertion .checkRows (rows , assertion .expectedRows )
366
+ ok , err := assertion .checkRows (t , rows , assertion .expectedRows )
367
367
require .NoError (t , err )
368
368
require .True (t , ok )
369
369
})
0 commit comments