package meta import "testing" var tors = map[string]string{ "bsd": "OpenBSD_5.9_amd64_install59.iso-2016-03-29-0449.torrent", "ogg": "OpenBSD_songs_ogg-2016-03-25-0127.torrent", "deb": "debian-8.5.0-amd64-netinst.iso.torrent", } func TestPieces(t *testing.T) { tor, err := New("../examples/" + tors["ogg"]) if err != nil { t.Error(err) } for i := 0; i < tor.Info.NPieces(); i++ { n, off, span := tor.Info.FileOffset(i) t.Log(n, off, span) } }