Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
e19cdc65
Commit
e19cdc65
authored
Jan 18, 2013
by
Andrew Gerrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing: allow examples to pass (fix build)
R=golang-dev CC=golang-dev
https://golang.org/cl/7132050
parent
c0229434
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
example.go
src/pkg/testing/example.go
+2
-0
No files found.
src/pkg/testing/example.go
View file @
e19cdc65
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment