aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata/cgo/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/cgo/main.go')
-rw-r--r--testdata/cgo/main.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/testdata/cgo/main.go b/testdata/cgo/main.go
index ddd1992e2..00e0ba01d 100644
--- a/testdata/cgo/main.go
+++ b/testdata/cgo/main.go
@@ -165,6 +165,8 @@ func main() {
println("C.GoString(nil):", C.GoString(nil))
println("len(C.GoStringN(nil, 0)):", len(C.GoStringN(nil, 0)))
println("len(C.GoBytes(nil, 0)):", len(C.GoBytes(nil, 0)))
+ println("len(C.GoBytes(C.CBytes(nil),0)):", len(C.GoBytes(C.CBytes(nil), 0)))
+ println(`rountrip CBytes:`, C.GoString((*C.char)(C.CBytes([]byte("hello\000")))))
// libc: test whether C functions work at all.
buf1 := []byte("foobar\x00")