]> Sergey Matveev's repositories - btrtrc.git/blobdiff - torrent_test.go
Use iotest.TestReader
[btrtrc.git] / torrent_test.go
index e740ab22184f226016cfbf95ed8fc5ebf6e79aef..b40650391d2e7c01e0636ed959797f5be349b620 100644 (file)
@@ -2,6 +2,7 @@ package torrent
 
 import (
        "fmt"
+       "io"
        "net"
        "os"
        "path/filepath"
@@ -92,7 +93,7 @@ func BenchmarkUpdatePiecePriorities(b *testing.B) {
        for range iter.N(7) {
                r := t.NewReader()
                r.SetReadahead(32 << 20)
-               r.Seek(3500000, 0)
+               r.Seek(3500000, io.SeekStart)
        }
        assert.Len(b, t.readers, 7)
        for i := 0; i < int(t.numPieces()); i += 3 {