File: conn_others_test.go

package info (click to toggle)
golang-github-mdlayher-netlink 1.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 368 kB
  • sloc: makefile: 5
file content (41 lines) | stat: -rw-r--r-- 952 bytes parent folder | download | duplicates (2)
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)
	}
}