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

Function TestComplex64

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

Source from the content-addressed store, hash-verified

65}
66
67func TestComplex64(t *testing.T) {
68 var x complex64
69 if *ToComplex64(x) != x {
70 t.Errorf("*ToComplex64(%v)", x)
71 }
72 if ToComplex64OrNil(x) != nil {
73 t.Errorf("ToComplex64OrNil(%v)", x)
74 }
75 if GetComplex64(nil) != x {
76 t.Errorf("GetComplex64(%v)", nil)
77 }
78
79 x = 42
80 if *ToComplex64(x) != x {
81 t.Errorf("*ToComplex64(%v)", x)
82 }
83 if *ToComplex64OrNil(x) != x {
84 t.Errorf("*ToComplex64OrNil(%v)", x)
85 }
86 if GetComplex64(&x) != x {
87 t.Errorf("GetComplex64(%v)", &x)
88 }
89}
90
91func TestComplex128(t *testing.T) {
92 var x complex128

Callers

nothing calls this directly

Calls 3

ToComplex64Function · 0.85
ToComplex64OrNilFunction · 0.85
GetComplex64Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…