summaryrefslogtreecommitdiff
path: root/xdelta3/go/src/xdelta
diff options
context:
space:
mode:
Diffstat (limited to 'xdelta3/go/src/xdelta')
-rw-r--r--xdelta3/go/src/xdelta/run.go3
-rw-r--r--xdelta3/go/src/xdelta/tgroup.go4
2 files changed, 5 insertions, 2 deletions
diff --git a/xdelta3/go/src/xdelta/run.go b/xdelta3/go/src/xdelta/run.go
index 6523a1c..448fabe 100644
--- a/xdelta3/go/src/xdelta/run.go
+++ b/xdelta3/go/src/xdelta/run.go
@@ -55,7 +55,8 @@ func (r *Runner) RunTest(name string, f func (t *TestGroup)) {
55 c := make(chan interface{}) 55 c := make(chan interface{})
56 go func() { 56 go func() {
57 defer func() { 57 defer func() {
58 c <- recover() 58 rec := recover()
59 c <- rec
59 }() 60 }()
60 fmt.Println("Testing", name, "...") 61 fmt.Println("Testing", name, "...")
61 f(t) 62 f(t)
diff --git a/xdelta3/go/src/xdelta/tgroup.go b/xdelta3/go/src/xdelta/tgroup.go
index b1b04ec..602b1e1 100644
--- a/xdelta3/go/src/xdelta/tgroup.go
+++ b/xdelta3/go/src/xdelta/tgroup.go
@@ -58,7 +58,9 @@ func (g *Goroutine) OK() {
58 58
59func (g *Goroutine) Panic(err error) { 59func (g *Goroutine) Panic(err error) {
60 g.finish(err) 60 g.finish(err)
61 runtime.Goexit() 61 if g != g.TestGroup.main {
62 runtime.Goexit()
63 }
62} 64}
63 65
64func (t *TestGroup) Main() *Goroutine { return t.main } 66func (t *TestGroup) Main() *Goroutine { return t.main }