16 lines
307 B
Go
16 lines
307 B
Go
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:pieceslee", string(b))
|
|
}
|