(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string)
| 1967 | } |
| 1968 | |
| 1969 | func 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 | |
| 2001 | func testPanicUTF8(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) { |
| 2002 | if s.RemoteGOROOT != "" { |
nothing calls this directly
no test coverage detected
searching dependent graphs…