summaryrefslogtreecommitdiff
path: root/misc/cgo/test/issue5548.go
diff options
context:
space:
mode:
authorTianon Gravi <admwiggin@gmail.com>2015-01-15 12:50:40 -0700
committerTianon Gravi <admwiggin@gmail.com>2015-01-15 12:50:40 -0700
commit2a0db60599fdd75b1bc3e297180fbe1282763759 (patch)
tree68d43c3e30d9ab961ddf6b7365201ca6b675b253 /misc/cgo/test/issue5548.go
parentef33cba3c8de6c431df56503df51fcd3a473c89e (diff)
parentf154da9e12608589e8d5f0508f908a0c3e88a1bb (diff)
downloadgolang-2a0db60599fdd75b1bc3e297180fbe1282763759.tar.gz
Merge tag 'upstream/1.4' into debian-experimental
* tag 'upstream/1.4': Imported Upstream version 1.4
Diffstat (limited to 'misc/cgo/test/issue5548.go')
-rw-r--r--misc/cgo/test/issue5548.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/misc/cgo/test/issue5548.go b/misc/cgo/test/issue5548.go
index b41f46562..c879f2ae9 100644
--- a/misc/cgo/test/issue5548.go
+++ b/misc/cgo/test/issue5548.go
@@ -14,13 +14,14 @@ import "C"
//export issue5548FromC
func issue5548FromC(s string, i int) int {
if len(s) == 4 && s == "test" && i == 42 {
- return 1
+ return 12345
}
- return 0
+ println("got", len(s), i)
+ return 9876
}
func test5548(t *testing.T) {
- if C.issue5548_in_c() == 0 {
- t.Fail()
+ if x := C.issue5548_in_c(); x != 12345 {
+ t.Errorf("issue5548_in_c = %d, want %d", x, 12345)
}
}