1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
14 func TestDeps(t *testing.T) {
15 out, err := exec.Command(testenv.GoToolPath(t), "list", "-f", "{{.Deps}}", "cmd/compile/internal/gc").Output()
19 for _, dep := range strings.Fields(strings.Trim(string(out), "[]")) {
21 case "go/build", "go/scanner":
22 // cmd/compile/internal/importer introduces a dependency
23 // on go/build and go/token; cmd/compile/internal/ uses
24 // go/constant which uses go/token in its API. Once we
25 // got rid of those dependencies, enable this check again.
27 // t.Errorf("undesired dependency on %q", dep)