aboutsummaryrefslogtreecommitdiff
path: root/tun2/client_test.go
blob: d3127a71de3d11368628b0a86870c59ab308bfcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package tun2

import (
	"net"
	"testing"
)

func TestNewClientNullConfig(t *testing.T) {
	_, err := NewClient(nil)
	if err == nil {
		t.Fatalf("expected NewClient(nil) to fail, got non-failure")
	}
}

func TestSmuxListenerIsNetListener(t *testing.T) {
	var sl interface{} = &smuxListener{}
	_, ok := sl.(net.Listener)
	if !ok {
		t.Fatalf("smuxListener does not implement net.Listener")
	}
}