Skip to content

Commit a6fbd29

Browse files
author
jjtimmons
committed
Add unit-test
1 parent c74ec39 commit a6fbd29

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

internal/encoded_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ import (
2424
"bytes"
2525
"encoding/gob"
2626
"fmt"
27-
"github.com/stretchr/testify/require"
2827
"reflect"
2928
"testing"
29+
30+
"github.com/stretchr/testify/require"
3031
)
3132

3233
func testDataConverterFunction(t *testing.T, dc DataConverter, f interface{}, args ...interface{}) string {
@@ -79,6 +80,13 @@ func TestDefaultDataConverter(t *testing.T) {
7980
r3 := testDataConverterFunction(t, dc, f3, []byte(""))
8081
require.Equal(t, r3, "nil-result")
8182
})
83+
t.Run("nil-resp", func(t *testing.T) {
84+
t.Parallel()
85+
86+
var ret []struct{}
87+
require.NoError(t, dc.FromData([]byte(""), []interface{}{&ret}))
88+
require.Nil(t, ret)
89+
})
8290
}
8391

8492
// testDataConverter implements encoded.DataConverter using gob

0 commit comments

Comments
 (0)