diff options
Diffstat (limited to 'libgo/go/testing/run_example.go')
-rw-r--r-- | libgo/go/testing/run_example.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libgo/go/testing/run_example.go b/libgo/go/testing/run_example.go index 10bde49..4dc83f7 100644 --- a/libgo/go/testing/run_example.go +++ b/libgo/go/testing/run_example.go @@ -43,6 +43,7 @@ func runExample(eg InternalExample) (ok bool) { outC <- buf.String() }() + finished := false start := time.Now() // Clean up in a deferred call so we can recover if the example panics. @@ -55,10 +56,11 @@ func runExample(eg InternalExample) (ok bool) { out := <-outC err := recover() - ok = eg.processRunResult(out, timeSpent, err) + ok = eg.processRunResult(out, timeSpent, finished, err) }() // Run example. eg.F() + finished = true return } |