summaryrefslogtreecommitdiff
path: root/src/runtime/syscall_windows_test.go
diff options
context:
space:
mode:
authorTianon Gravi <admwiggin@gmail.com>2015-05-02 10:02:54 -0600
committerTianon Gravi <admwiggin@gmail.com>2015-05-02 10:02:54 -0600
commit839657a730bd3c82d1b7932f996dd87448eb7d38 (patch)
treed46006c2df507ba8cfd57a47169d326349b5c749 /src/runtime/syscall_windows_test.go
parent90ad8a7e5881be7834909c649f994b6b5244c965 (diff)
downloadgolang-839657a730bd3c82d1b7932f996dd87448eb7d38.tar.gz
Imported Upstream version 1.4.2upstream/1.4.2upstream-sid
Diffstat (limited to 'src/runtime/syscall_windows_test.go')
-rw-r--r--src/runtime/syscall_windows_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/syscall_windows_test.go b/src/runtime/syscall_windows_test.go
index ce8a9ec1b..126bef62e 100644
--- a/src/runtime/syscall_windows_test.go
+++ b/src/runtime/syscall_windows_test.go
@@ -533,3 +533,11 @@ func main() {
println(z)
}
`
+
+func TestCallbackWithNoInputParameters(t *testing.T) {
+ // Test that NewCallback and NewCallbackCDecl can accept functions without
+ // input parameters, see issue 9871.
+ cb := func() uintptr { return 0 }
+ _ = syscall.NewCallback(cb)
+ _ = syscall.NewCallbackCDecl(cb)
+}