FedP2P/metainfo/info_test.go

16 lines
307 B
Go
Raw Normal View History

package metainfo
import (
"testing"
"github.com/anacrolix/torrent/bencode"
"github.com/stretchr/testify/assert"
)
func TestMarshalInfo(t *testing.T) {
var info Info
b, err := bencode.Marshal(info)
assert.NoError(t, err)
assert.EqualValues(t, "d4:name0:12:piece lengthi0e6:pieces0:e", string(b))
}