]> Cypherpunks.ru repositories - gostls13.git/commitdiff
cmd/go: remove unused (*testgoData).mustHaveContent test helper
authorTobias Klauser <tklauser@distanz.ch>
Wed, 6 Sep 2023 09:31:58 +0000 (11:31 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Wed, 25 Oct 2023 19:46:53 +0000 (19:46 +0000)
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>

src/cmd/go/go_test.go

index 1c4374da4b02051dd99f5bbe84d68da6ed948105..1e28bec92d0a3fc717aacff387cdd73445cc71a7 100644 (file)
@@ -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()