File: vsock_others_test.go

package info (click to toggle)
golang-github-mdlayher-vsock 1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 260 kB
  • sloc: makefile: 3
file content (25 lines) | stat: -rw-r--r-- 528 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
//go:build !linux
// +build !linux

package vsock

import "testing"

func TestUnimplemented(t *testing.T) {
	want := errUnimplemented

	if _, got := ContextID(); want != got {
		t.Fatalf("unexpected error from ContextID:\n- want: %v\n-  got: %v",
			want, got)
	}

	if _, got := listen(0, 0, nil); want != got {
		t.Fatalf("unexpected error from listen:\n- want: %v\n-  got: %v",
			want, got)
	}

	if _, got := dial(0, 0, nil); want != got {
		t.Fatalf("unexpected error from dial:\n- want: %v\n-  got: %v",
			want, got)
	}
}