forked from mdlayher/netlink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconn_others_test.go
52 lines (41 loc) · 1.17 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
//+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.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)
}
if got := c.JoinGroup(0); want != got {
t.Fatalf("unexpected error during c.JoinGroup:\n- want: %v\n- got: %v",
want, got)
}
if got := c.LeaveGroup(0); want != got {
t.Fatalf("unexpected error during c.LeaveGroup:\n- want: %v\n- got: %v",
want, got)
}
if got := c.SetBPF(nil); want != got {
t.Fatalf("unexpected error during c.SetBPF:\n- want: %v\n- got: %v",
want, got)
}
}