File: rfkill_test.go

package info (click to toggle)
golang-github-muka-go-bluetooth 5.60-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,688 kB
  • sloc: makefile: 92; sh: 2
file content (54 lines) | stat: -rw-r--r-- 845 bytes parent folder | download
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
53
54
package rfkill

import "testing"

var testAdapterID = "hci0"

func TestGetAdapterStatus(t *testing.T) {
	_, err := GetAdapterStatus(testAdapterID)
	if err != nil {
		t.Fatal(err)
	}
}

func TestToggleAdapter(t *testing.T) {
	err := ToggleAdapter(testAdapterID)
	if err != nil {
		t.Fatal(err)
	}
}

func TestTurnOnAdapter(t *testing.T) {
	err := TurnOnAdapter(testAdapterID)
	if err != nil {
		t.Fatal(err)
	}
}

func TestTurnOffAdapter(t *testing.T) {
	err := TurnOffAdapter(testAdapterID)
	if err != nil {
		t.Fatal(err)
	}
}

func TestTurnOnBluetooth(t *testing.T) {
	err := TurnOnBluetooth()
	if err != nil {
		t.Fatal(err)
	}
}

func TestTurnOffBluetooth(t *testing.T) {
	err := TurnOffBluetooth()
	if err != nil {
		t.Fatal(err)
	}
}

func TestToggleBluetooth(t *testing.T) {
	err := ToggleBluetooth()
	if err != nil {
		t.Fatal(err)
	}
}