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

Function TestInt64

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

Source from the content-addressed store, hash-verified

281}
282
283func TestInt64(t *testing.T) {
284 var x int64
285 if *ToInt64(x) != x {
286 t.Errorf("*ToInt64(%v)", x)
287 }
288 if ToInt64OrNil(x) != nil {
289 t.Errorf("ToInt64OrNil(%v)", x)
290 }
291 if GetInt64(nil) != x {
292 t.Errorf("GetInt64(%v)", nil)
293 }
294
295 x = 42
296 if *ToInt64(x) != x {
297 t.Errorf("*ToInt64(%v)", x)
298 }
299 if *ToInt64OrNil(x) != x {
300 t.Errorf("*ToInt64OrNil(%v)", x)
301 }
302 if GetInt64(&x) != x {
303 t.Errorf("GetInt64(%v)", &x)
304 }
305}
306
307func TestRune(t *testing.T) {
308 var x rune

Callers

nothing calls this directly

Calls 3

ToInt64Function · 0.85
ToInt64OrNilFunction · 0.85
GetInt64Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…