2
0
mirror of synced 2025-02-23 14:18:13 +00:00
torrent/handshake_test.go
2018-02-05 00:18:38 +11:00

16 lines
317 B
Go

package torrent
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestDefaultExtensionBytes(t *testing.T) {
pex := defaultPeerExtensionBytes()
assert.True(t, pex.SupportsDHT())
assert.True(t, pex.SupportsExtended())
assert.False(t, pex.GetBit(63))
assert.Panics(t, func() { pex.GetBit(64) })
}