summaryrefslogtreecommitdiff
path: root/misc/cgo/test/callback.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-05-23 09:45:29 +0200
committerOndřej Surý <ondrej@sury.org>2011-05-23 09:45:29 +0200
commit63d29fefab5290dc96e0a03ff70603aefa995887 (patch)
tree95da0105686f9aba568a72e7a8ebd580a4fda20e /misc/cgo/test/callback.go
parentad811fbb8897a9a3063274e927133915941f1dca (diff)
downloadgolang-63d29fefab5290dc96e0a03ff70603aefa995887.tar.gz
Imported Upstream version 2011.05.22upstream-weekly/2011.05.22
Diffstat (limited to 'misc/cgo/test/callback.go')
-rw-r--r--misc/cgo/test/callback.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/misc/cgo/test/callback.go b/misc/cgo/test/callback.go
index 450a7cbf2..3edee9758 100644
--- a/misc/cgo/test/callback.go
+++ b/misc/cgo/test/callback.go
@@ -27,7 +27,7 @@ func goCallback(p unsafe.Pointer) {
(*(*func())(unsafe.Pointer(&p)))()
}
-func TestCallback(t *testing.T) {
+func testCallback(t *testing.T) {
var x = false
nestedCall(func() { x = true })
if !x {
@@ -35,13 +35,13 @@ func TestCallback(t *testing.T) {
}
}
-func TestCallbackGC(t *testing.T) {
+func testCallbackGC(t *testing.T) {
nestedCall(runtime.GC)
}
func lockedOSThread() bool // in runtime.c
-func TestCallbackPanic(t *testing.T) {
+func testCallbackPanic(t *testing.T) {
// Make sure panic during callback unwinds properly.
if lockedOSThread() {
t.Fatal("locked OS thread on entry to TestCallbackPanic")
@@ -62,14 +62,14 @@ func TestCallbackPanic(t *testing.T) {
panic("nestedCall returned")
}
-func TestCallbackPanicLoop(t *testing.T) {
+func testCallbackPanicLoop(t *testing.T) {
// Make sure we don't blow out m->g0 stack.
for i := 0; i < 100000; i++ {
TestCallbackPanic(t)
}
}
-func TestCallbackPanicLocked(t *testing.T) {
+func testCallbackPanicLocked(t *testing.T) {
runtime.LockOSThread()
defer runtime.UnlockOSThread()
@@ -94,7 +94,7 @@ func TestCallbackPanicLocked(t *testing.T) {
// Callback with zero arguments used to make the stack misaligned,
// which broke the garbage collector and other things.
-func TestZeroArgCallback(t *testing.T) {
+func testZeroArgCallback(t *testing.T) {
defer func() {
s := recover()
if s != nil {
@@ -118,7 +118,7 @@ func goFoo() {
func variadic(x ...interface{}) {}
-func TestBlocking(t *testing.T) {
+func testBlocking(t *testing.T) {
c := make(chan int)
go func() {
for i := 0; i < 10; i++ {