mirror of https://github.com/golang/go.git
cmd/go: use t.Fatalf for formatted errors
Change-Id: I657588ccc4a87e075d15acb9f4cd1e417bbd7960 Reviewed-on: https://go-review.googlesource.com/16421 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
8537ff8a39
commit
85a6a9771d
|
|
@ -458,7 +458,7 @@ func (tg *testgoData) grepCountBoth(match string) int {
|
||||||
// removed if it exists.
|
// removed if it exists.
|
||||||
func (tg *testgoData) creatingTemp(path string) {
|
func (tg *testgoData) creatingTemp(path string) {
|
||||||
if filepath.IsAbs(path) && !strings.HasPrefix(path, tg.tempdir) {
|
if filepath.IsAbs(path) && !strings.HasPrefix(path, tg.tempdir) {
|
||||||
tg.t.Fatal("internal testsuite error: creatingTemp(%q) with absolute path not in temporary directory", path)
|
tg.t.Fatalf("internal testsuite error: creatingTemp(%q) with absolute path not in temporary directory", path)
|
||||||
}
|
}
|
||||||
// If we have changed the working directory, make sure we have
|
// If we have changed the working directory, make sure we have
|
||||||
// an absolute path, because we are going to change directory
|
// an absolute path, because we are going to change directory
|
||||||
|
|
@ -2235,7 +2235,7 @@ func TestGoTestImportErrorStack(t *testing.T) {
|
||||||
tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
|
tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
|
||||||
tg.runFail("test", "testdep/p1")
|
tg.runFail("test", "testdep/p1")
|
||||||
if !strings.Contains(tg.stderr.String(), out) {
|
if !strings.Contains(tg.stderr.String(), out) {
|
||||||
t.Fatal("did not give full import stack:\n\n%s", tg.stderr.String())
|
t.Fatalf("did not give full import stack:\n\n%s", tg.stderr.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue