mirror of
https://github.com/golang/go.git
synced 2025-11-08 04:31:01 +00:00
testing: allow examples to pass (fix build)
R=golang-dev CC=golang-dev https://golang.org/cl/7132050
This commit is contained in:
parent
c022943449
commit
e19cdc651c
1 changed files with 2 additions and 0 deletions
|
|
@ -67,6 +67,7 @@ func runExample(eg InternalExample) (ok bool) {
|
|||
}()
|
||||
|
||||
start := time.Now()
|
||||
ok = true
|
||||
|
||||
// Clean up in a deferred call so we can recover if the example panics.
|
||||
defer func() {
|
||||
|
|
@ -84,6 +85,7 @@ func runExample(eg InternalExample) (ok bool) {
|
|||
}
|
||||
if fail != "" || err != nil {
|
||||
fmt.Printf("--- FAIL: %s (%v)\n%s", eg.Name, d, fail)
|
||||
ok = false
|
||||
} else if *chatty {
|
||||
fmt.Printf("--- PASS: %s (%v)\n", eg.Name, d)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue