aboutsummaryrefslogtreecommitdiff
path: root/meta/torrent_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'meta/torrent_test.go')
-rw-r--r--meta/torrent_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/meta/torrent_test.go b/meta/torrent_test.go
index c3e960c..d393e45 100644
--- a/meta/torrent_test.go
+++ b/meta/torrent_test.go
@@ -32,10 +32,9 @@ func TestPieces(t *testing.T) {
if err != nil {
t.Error(err)
}
- for i := 0; i < tor.Info.NPieces(); i++ {
- off := i * tor.Info.PieceLength
- n, foff := tor.Info.FindFile(off)
- t.Log(off, n, foff)
+ for i, p := range tor.Info.GetPieces() {
+ n, off := tor.Info.FindFile(p.Offset)
+ t.Log(i, n, off)
}
}