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
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
}