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