Skip to content

Commit ef77e5a

Browse files
committed
unit test the nil case of Hasresultset
1 parent 0462083 commit ef77e5a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mysql/result_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ func TestHasResultset_true(t *testing.T) {
1717
b := r.HasResultset()
1818
require.Equal(t, true, b)
1919
}
20+
21+
// this shouldn't happen after d02e79a, but test just in case
22+
func TestHasResultset_nil(t *testing.T) {
23+
var r *Result
24+
b := r.HasResultset()
25+
require.Equal(t, false, b)
26+
}

0 commit comments

Comments
 (0)