From da1c2b182a029a4f3b050442573cd47abfe93291 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Wed, 25 Jun 2014 12:04:36 +1000 Subject: [PATCH] undo CL 107320046 / 97cd07dcb9d8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Breaks the build ««« original CL description cmd/go: build test files containing non-runnable examples Even if we can't run them, we should at least check that they compile. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/107320046 »»» TBR=rsc R=rsc CC=golang-codereviews https://golang.org/cl/110140044 --- src/cmd/go/test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/test.go b/src/cmd/go/test.go index ac32181118..5935c98db9 100644 --- a/src/cmd/go/test.go +++ b/src/cmd/go/test.go @@ -1177,12 +1177,12 @@ func (t *testFuncs) load(filename, pkg string, seen *bool) error { ex := doc.Examples(f) sort.Sort(byOrder(ex)) for _, e := range ex { - *seen = true // Build the file even if the example is not runnable. if e.Output == "" && !e.EmptyOutput { // Don't run examples with no output. continue } t.Examples = append(t.Examples, testFunc{pkg, "Example" + e.Name, e.Output}) + *seen = true } return nil } -- 2.48.1