-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy pathconn_others_test.go
41 lines (32 loc) · 952 Bytes
/
conn_others_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//go:build !linux
// +build !linux
package netlink
import "testing"
func TestOthersConnUnimplemented(t *testing.T) {
c := &conn{}
want := errUnimplemented
if got := newError(0); want != got {
t.Fatalf("unexpected error during newError:\n- want: %v\n- got: %v",
want, got)
}
if _, _, got := dial(0, nil); want != got {
t.Fatalf("unexpected error during dial:\n- want: %v\n- got: %v",
want, got)
}
if got := c.Send(Message{}); want != got {
t.Fatalf("unexpected error during c.Send:\n- want: %v\n- got: %v",
want, got)
}
if got := c.SendMessages(nil); want != got {
t.Fatalf("unexpected error during c.SendMessages:\n- want: %v\n- got: %v",
want, got)
}
if _, got := c.Receive(); want != got {
t.Fatalf("unexpected error during c.Receive:\n- want: %v\n- got: %v",
want, got)
}
if got := c.Close(); want != got {
t.Fatalf("unexpected error during c.Close:\n- want: %v\n- got: %v",
want, got)
}
}