2017-11-08 08:28:03 +00:00
|
|
|
package torrent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestDefaultExtensionBytes(t *testing.T) {
|
2018-02-04 13:18:38 +00:00
|
|
|
pex := defaultPeerExtensionBytes()
|
2017-11-08 08:28:03 +00:00
|
|
|
assert.True(t, pex.SupportsDHT())
|
|
|
|
assert.True(t, pex.SupportsExtended())
|
2018-02-04 13:18:38 +00:00
|
|
|
assert.False(t, pex.GetBit(63))
|
|
|
|
assert.Panics(t, func() { pex.GetBit(64) })
|
2017-11-08 08:28:03 +00:00
|
|
|
}
|