fs/torrentfs_test.go | 7 ++++++- diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go index f45b7d8173052e84e0659237a2484cd1bbd89c7a..ad8ac3757dd5287da061b515d9bcaf8dfcd6437e 100644 --- a/fs/torrentfs_test.go +++ b/fs/torrentfs_test.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "io/ioutil" + "log" "net" "net/http" _ "net/http/pprof" @@ -25,6 +26,10 @@ "github.com/anacrolix/torrent/data/mmap" "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/util" ) + +func init() { + log.SetFlags(log.Flags() | log.Lshortfile) +} func TestTCPAddrString(t *testing.T) { l, err := net.Listen("tcp4", "localhost:0") @@ -238,6 +243,6 @@ Size: int(size), }, resp) content := resp.Data if string(content) != testutil.GreetingFileContents { - t.FailNow() + t.Fatalf("%q != %q", string(content), testutil.GreetingFileContents) } }