]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cover: fix off-by-one in test error message
authorRob Pike <r@golang.org>
Mon, 18 Jun 2018 03:57:27 +0000 (13:57 +1000)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 18 Jun 2018 11:53:40 +0000 (11:53 +0000)
Drive-by after previous CL.

Change-Id: I87db65b65745a0d76500cce06ac276b0d7928404
Reviewed-on: https://go-review.googlesource.com/119395
Reviewed-by: Ralph Corderoy <ralph@inputplus.co.uk>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/cover/cover_test.go

index 23a609996bbea1691ccd3b72951f529c56832073..c818819c3927724081d531058800660c0a2d7f24 100644 (file)
@@ -325,7 +325,7 @@ func TestCoverHTML(t *testing.T) {
                }
        }
        if len(goldenLines) != len(outLines) {
-               t.Fatalf("output longer than golden; first extra output line %d: %q\n", len(goldenLines), outLines[len(goldenLines)])
+               t.Fatalf("output longer than golden; first extra output line %d: %q\n", len(goldenLines)+1, outLines[len(goldenLines)])
        }
 }