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