Skip to content

Commit

Permalink
Add more tests for ResultSet Scan (#304)
Browse files Browse the repository at this point in the history
* Add more tests for ResultSet Scan

* empty commit for rebuilding
  • Loading branch information
haoxins authored Jan 22, 2024
1 parent 5554785 commit d8b37eb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions result_set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,17 @@ func TestScan(t *testing.T) {
assert.Equal(t, 1, len(testStructList))
assert.Equal(t, int64(1), testStructList[0].Col0)
assert.Equal(t, "value1", testStructList[0].Col1)

// Scan again should work
err = resultSet.Scan(&testStructList)
if err != nil {
t.Error(err)
}
assert.Equal(t, 2, len(testStructList))
assert.Equal(t, int64(1), testStructList[0].Col0)
assert.Equal(t, "value1", testStructList[0].Col1)
assert.Equal(t, int64(1), testStructList[1].Col0)
assert.Equal(t, "value1", testStructList[1].Col1)
}

func TestIntVid(t *testing.T) {
Expand Down

0 comments on commit d8b37eb

Please sign in to comment.