summaryrefslogtreecommitdiff
path: root/misc/cgo/test
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2013-03-23 11:29:06 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-03-23 11:29:06 +0100
commitcc71238f4c5d23ee2ebffd0d6c307e308ea163c1 (patch)
treedd0b57254871fac715258385f5485ba136d6b62a /misc/cgo/test
parentb32e37d71adab0e2a2b7c4433e7bad169a9a4f98 (diff)
parentb39e15dde5ec7b96c15da9faf4ab5892501c1aae (diff)
downloadgolang-cc71238f4c5d23ee2ebffd0d6c307e308ea163c1.tar.gz
Merge tag 'upstream/1.1_hg20130323' into debian-sid
Upstream version 1.1~hg20130323
Diffstat (limited to 'misc/cgo/test')
-rw-r--r--misc/cgo/test/cthread.go1
-rw-r--r--misc/cgo/test/issue4029.go9
2 files changed, 6 insertions, 4 deletions
diff --git a/misc/cgo/test/cthread.go b/misc/cgo/test/cthread.go
index d918d033f..bdfd1103d 100644
--- a/misc/cgo/test/cthread.go
+++ b/misc/cgo/test/cthread.go
@@ -35,6 +35,7 @@ func testCthread(t *testing.T) {
t.Skip("testCthread disabled on arm")
}
+ sum.i = 0
C.doAdd(10, 6)
want := 10 * (10 - 1) / 2 * 6
diff --git a/misc/cgo/test/issue4029.go b/misc/cgo/test/issue4029.go
index 7495d38fe..b0385eb85 100644
--- a/misc/cgo/test/issue4029.go
+++ b/misc/cgo/test/issue4029.go
@@ -47,14 +47,15 @@ func test4029(t *testing.T) {
func loadThySelf(t *testing.T, symbol string) {
this_process := C.dlopen(nil, C.RTLD_NOW)
if this_process == nil {
- t.Fatal("dlopen:", C.GoString(C.dlerror()))
+ t.Error("dlopen:", C.GoString(C.dlerror()))
+ return
}
defer C.dlclose(this_process)
symbol_address := C.dlsym(this_process, C.CString(symbol))
if symbol_address == nil {
- t.Fatal("dlsym:", C.GoString(C.dlerror()))
- } else {
- t.Log(symbol, symbol_address)
+ t.Error("dlsym:", C.GoString(C.dlerror()))
+ return
}
+ t.Log(symbol, symbol_address)
}