mirror of
https://github.com/golang/go
synced 2024-11-26 14:56:47 -07:00
cmd/go: build errors rather than fmt in a couple of tests
The errors package is smaller and builds faster. Update #11779. Change-Id: Iaf2d43734ec4b0aa325590eb5d38522306b608cb Reviewed-on: https://go-review.googlesource.com/12366 Reviewed-by: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
b9a3e5979d
commit
510f1dbad7
@ -1277,9 +1277,10 @@ func TestRejectRelativePathsInGOPATHCommandLinePackage(t *testing.T) {
|
||||
func TestGoTestWithPackageListedMultipleTimes(t *testing.T) {
|
||||
tg := testgo(t)
|
||||
defer tg.cleanup()
|
||||
tg.run("test", "fmt", "fmt", "fmt", "fmt", "fmt")
|
||||
tg.parallel()
|
||||
tg.run("test", "errors", "errors", "errors", "errors", "errors")
|
||||
if strings.Index(strings.TrimSpace(tg.getStdout()), "\n") != -1 {
|
||||
t.Error("go test fmt fmt fmt fmt fmt tested the same package multiple times")
|
||||
t.Error("go test errors errors errors errors errors tested the same package multiple times")
|
||||
}
|
||||
}
|
||||
|
||||
@ -1779,12 +1780,13 @@ func TestCgoHandlesWlORIGIN(t *testing.T) {
|
||||
tg.run("build", "origin")
|
||||
}
|
||||
|
||||
// "go test -c -test.bench=XXX fmt" should not hang'
|
||||
// "go test -c -test.bench=XXX errors" should not hang
|
||||
func TestIssue6480(t *testing.T) {
|
||||
tg := testgo(t)
|
||||
defer tg.cleanup()
|
||||
tg.creatingTemp("fmt.test" + exeSuffix)
|
||||
tg.run("test", "-c", "-test.bench=XXX", "fmt")
|
||||
tg.makeTempdir()
|
||||
tg.cd(tg.path("."))
|
||||
tg.run("test", "-c", "-test.bench=XXX", "errors")
|
||||
}
|
||||
|
||||
// cmd/cgo: undefined reference when linking a C-library using gccgo
|
||||
|
Loading…
Reference in New Issue
Block a user