You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/net/memnet/conn_test.go

22 lines
377 B
Go

// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
package memnet
import (
"net"
"testing"
"golang.org/x/net/nettest"
)
func TestConn(t *testing.T) {
nettest.TestConn(t, func() (c1 net.Conn, c2 net.Conn, stop func(), err error) {
c1, c2 = NewConn("test", bufferSize)
return c1, c2, func() {
c1.Close()
c2.Close()
}, nil
})
}