MCPcopy Index your code
hub / github.com/AlekSi/pointer / TestByte

Function TestByte

pointer_test.go:43–65  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func TestByte(t *testing.T) {
44 var x byte
45 if *ToByte(x) != x {
46 t.Errorf("*ToByte(%v)", x)
47 }
48 if ToByteOrNil(x) != nil {
49 t.Errorf("ToByteOrNil(%v)", x)
50 }
51 if GetByte(nil) != x {
52 t.Errorf("GetByte(%v)", nil)
53 }
54
55 x = 42
56 if *ToByte(x) != x {
57 t.Errorf("*ToByte(%v)", x)
58 }
59 if *ToByteOrNil(x) != x {
60 t.Errorf("*ToByteOrNil(%v)", x)
61 }
62 if GetByte(&x) != x {
63 t.Errorf("GetByte(%v)", &x)
64 }
65}
66
67func TestComplex64(t *testing.T) {
68 var x complex64

Callers

nothing calls this directly

Calls 3

ToByteFunction · 0.85
ToByteOrNilFunction · 0.85
GetByteFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…