To use an importer that knows where to find stdlib .a files based on
their new locations once the checked-in .a files are removed.
Change-Id: I981812306b3512380d58cb0f599a9a61b27ba0d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/442695
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
func TestIssue43124(t *testing.T) {
// TODO(rFindley) move this to testdata by enhancing support for importing.
+ testenv.MustHaveGoBuild(t) // The go command is needed for the importer to determine the locations of stdlib .a files.
+
// All involved packages have the same name (template). Error messages should
// disambiguate between text/template and html/template by printing the full
// path.
"go/importer"
"go/parser"
"go/token"
+ "internal/testenv"
"path"
"path/filepath"
"testing"
)
func TestSelf(t *testing.T) {
+ testenv.MustHaveGoBuild(t) // The Go command is needed for the importer to determine the locations of stdlib .a files.
+
fset := token.NewFileSet()
files, err := pkgFiles(fset, ".")
if err != nil {
}
func BenchmarkCheck(b *testing.B) {
+ testenv.MustHaveGoBuild(b) // The Go command is needed for the importer to determine the locations of stdlib .a files.
+
for _, p := range []string{
"net/http",
"go/parser",
"go/parser"
"go/token"
"go/types"
+ "internal/testenv"
"testing"
)
// Issue #53884.
func TestAtomicAlign(t *testing.T) {
+ testenv.MustHaveGoBuild(t) // The Go command is needed for the importer to determine the locations of stdlib .a files.
+
const src = `
package main
}
func TestTypeString(t *testing.T) {
+ // The Go command is needed for the importer to determine the locations of stdlib .a files.
testenv.MustHaveGoBuild(t)
var tests []testEntry