aboutsummaryrefslogtreecommitdiff
path: root/meta/torrent_test.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-07-06 03:16:54 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-07-06 03:16:54 +0200
commite7daf8c15a1b0e3afa06fc8ccc5f1fc9d4c8cbaa (patch)
treeb3024820f8191610f622efa6eda75c4e77f86a8a /meta/torrent_test.go
parent910a5ae2c7ac25184afed9334f271581deb31fd1 (diff)
wip
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)
}
}