mirror of
https://github.com/golang/go
synced 2024-11-26 20:41:24 -07:00
cmd/go: remove unused (*testgoData).mustHaveContent test helper
It's unused since CL 214382. Change-Id: I83a860938f87a7c4d2bdb966689c17ba29066639 Reviewed-on: https://go-review.googlesource.com/c/go/+/537596 Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
37788b8b9e
commit
9f84df7f01
@ -791,19 +791,6 @@ func (tg *testgoData) mustNotExist(path string) {
|
||||
}
|
||||
}
|
||||
|
||||
// mustHaveContent succeeds if filePath is a path to a file,
|
||||
// and that file is readable and not empty.
|
||||
func (tg *testgoData) mustHaveContent(filePath string) {
|
||||
tg.mustExist(filePath)
|
||||
f, err := os.Stat(filePath)
|
||||
if err != nil {
|
||||
tg.t.Fatal(err)
|
||||
}
|
||||
if f.Size() == 0 {
|
||||
tg.t.Fatalf("expected %s to have data, but is empty", filePath)
|
||||
}
|
||||
}
|
||||
|
||||
// wantExecutable fails with msg if path is not executable.
|
||||
func (tg *testgoData) wantExecutable(path, msg string) {
|
||||
tg.t.Helper()
|
||||
|
Loading…
Reference in New Issue
Block a user