MCPcopy Index your code
hub / github.com/pkg/errors / TestFuncname

Function TestFuncname

stack_test.go:95–114  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestFuncname(t *testing.T) {
96 tests := []struct {
97 name, want string
98 }{
99 {"", ""},
100 {"runtime.main", "main"},
101 {"github.com/pkg/errors.funcname", "funcname"},
102 {"funcname", "funcname"},
103 {"io.copyBuffer", "copyBuffer"},
104 {"main.(*R).Write", "(*R).Write"},
105 }
106
107 for _, tt := range tests {
108 got := funcname(tt.name)
109 want := tt.want
110 if got != want {
111 t.Errorf("funcname(%q): want: %q, got %q", tt.name, want, got)
112 }
113 }
114}
115
116func TestStackTrace(t *testing.T) {
117 tests := []struct {

Callers

nothing calls this directly

Calls 1

funcnameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…