Message:
Hello golan...@googlegroups.com,
I'd like you to review this change to
https://code.google.com/p/go/
Description:
testing: don't run examples if -test.run is set
If we're restricting tests, don't blindly include examples; things can
get noisy.
Please review this at http://codereview.appspot.com/5701051/
Affected files:
M src/pkg/testing/example.go
Index: src/pkg/testing/example.go
===================================================================
--- a/src/pkg/testing/example.go
+++ b/src/pkg/testing/example.go
@@ -20,6 +20,9 @@
}
func RunExamples(examples []InternalExample) (ok bool) {
+ if *match != "" {
+ return // Don't run examples if testing is restricted: we're debugging.
+ }
ok = true
var eg InternalExample