"bytes"
"fmt"
"io/ioutil"
+ "log"
"net"
"net/http"
_ "net/http/pprof"
"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")
if err != nil {
}, resp)
content := resp.Data
if string(content) != testutil.GreetingFileContents {
- t.FailNow()
+ t.Fatalf("%q != %q", string(content), testutil.GreetingFileContents)
}
}