Skip to content

Commit 1dbc32d

Browse files
committed
Add test
1 parent bd773ec commit 1dbc32d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

callback_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,15 @@ func TestCallbackConverters(t *testing.T) {
102102
}
103103
}
104104
}
105+
106+
func TestCallbackReturnAny(t *testing.T) {
107+
udf := func() interface{} {
108+
return 1
109+
}
110+
111+
typ := reflect.TypeOf(udf)
112+
cb, err := callbackRet(typ.Out(0))
113+
if err != nil {
114+
t.Errorf("Expected valid callback for any return type, got: %s", err)
115+
}
116+
}

0 commit comments

Comments
 (0)