MCPcopy Index your code
hub / github.com/maruel/panicparse / testPanicStr

Function testPanicStr

stack/context_test.go:1969–1999  ·  view source on GitHub ↗
(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string)

Source from the content-addressed store, hash-verified

1967}
1968
1969func testPanicStr(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) {
1970 if s.RemoteGOROOT != "" {
1971 t.Fatalf("RemoteGOROOT is %q", s.RemoteGOROOT)
1972 }
1973 if b.String() != "GOTRACEBACK=all\npanic: allo\n\n" {
1974 t.Fatalf("output: %q", b.String())
1975 }
1976 want := []*Goroutine{
1977 {
1978 Signature: Signature{
1979 State: "running",
1980 Stack: Stack{
1981 Calls: []Call{
1982 newCallLocal(
1983 "main.panicstr",
1984 Args{Values: []Arg{{IsAggregate: true, Fields: Args{
1985 Values: []Arg{{Value: 0x123456, IsPtr: true}, {Value: 4}},
1986 }}}},
1987 pathJoin(ppDir, "main.go"),
1988 50),
1989 newCallLocal("main.init.func19", Args{}, pathJoin(ppDir, "main.go"), 307),
1990 newCallLocal("main.main", Args{}, pathJoin(ppDir, "main.go"), 340),
1991 },
1992 },
1993 },
1994 ID: 1,
1995 First: true,
1996 },
1997 }
1998 similarGoroutines(t, want, s.Goroutines)
1999}
2000
2001func testPanicUTF8(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) {
2002 if s.RemoteGOROOT != "" {

Callers

nothing calls this directly

Calls 4

pathJoinFunction · 0.85
similarGoroutinesFunction · 0.85
newCallLocalFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…