MCPcopy Index your code
hub / github.com/pocketbase/pocketbase / TestPointer

Function TestPointer

tools/types/types_test.go:9–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestPointer(t *testing.T) {
10 s1 := types.Pointer("")
11 if s1 == nil || *s1 != "" {
12 t.Fatalf("Expected empty string pointer, got %#v", s1)
13 }
14
15 s2 := types.Pointer("test")
16 if s2 == nil || *s2 != "test" {
17 t.Fatalf("Expected 'test' string pointer, got %#v", s2)
18 }
19
20 s3 := types.Pointer(123)
21 if s3 == nil || *s3 != 123 {
22 t.Fatalf("Expected 123 string pointer, got %#v", s3)
23 }
24}

Callers

nothing calls this directly

Calls 1

PointerFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…