Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
eatonphil committed May 13, 2022
1 parent bd773ec commit 1dbc32d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions callback_test.go
Expand Up @@ -102,3 +102,15 @@ func TestCallbackConverters(t *testing.T) {
}
}
}

func TestCallbackReturnAny(t *testing.T) {
udf := func() interface{} {
return 1
}

typ := reflect.TypeOf(udf)
cb, err := callbackRet(typ.Out(0))
if err != nil {
t.Errorf("Expected valid callback for any return type, got: %s", err)
}
}

0 comments on commit 1dbc32d

Please sign in to comment.