2017-09-13 22:25:29 +08:00
|
|
|
package torrent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2022-02-15 13:18:32 +08:00
|
|
|
"github.com/anacrolix/log"
|
|
|
|
|
2017-09-13 22:25:29 +08:00
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestNewUtpSocketErrorNilInterface(t *testing.T) {
|
2022-02-15 13:18:32 +08:00
|
|
|
s, err := NewUtpSocket("fix", "your:language", nil, log.Default)
|
2017-09-13 22:25:29 +08:00
|
|
|
assert.Error(t, err)
|
|
|
|
if s != nil {
|
|
|
|
t.Fatalf("expected nil, got %#v", s)
|
|
|
|
}
|
|
|
|
}
|