github.com/anacrolix/torrent@v1.61.0/utp_test.go (about)

     1  package torrent
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/anacrolix/log"
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func TestNewUtpSocketErrorNilInterface(t *testing.T) {
    11  	s, err := NewUtpSocket("fix", "your:language", nil, log.Default)
    12  	assert.Error(t, err)
    13  	if s != nil {
    14  		t.Fatalf("expected nil, got %#v", s)
    15  	}
    16  }