MCPcopy Create free account
hub / github.com/maruel/panicparse / testPanicArgsElided

Function testPanicArgsElided

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

Source from the content-addressed store, hash-verified

1793}
1794
1795func testPanicArgsElided(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) {
1796 if s.RemoteGOROOT != "" {
1797 t.Fatalf("RemoteGOROOT is %q", s.RemoteGOROOT)
1798 }
1799 if b.String() != "GOTRACEBACK=all\npanic: 1\n\n" {
1800 t.Fatalf("output: %q", b.String())
1801 }
1802 want := []*Goroutine{
1803 {
1804 Signature: Signature{
1805 State: "running",
1806 Stack: Stack{
1807 Calls: []Call{
1808 newCallLocal(
1809 "main.panicArgsElided",
1810 Args{
1811 Values: []Arg{{Value: 1}, {Value: 2}, {Value: 3}, {Value: 4}, {Value: 5}, {Value: 6}, {Value: 7}, {Value: 8}, {Value: 9}, {Value: 10}},
1812 Elided: true,
1813 },
1814 pathJoin(ppDir, "main.go"),
1815 58),
1816 newCallLocal("main.init.func1", Args{}, pathJoin(ppDir, "main.go"), 134),
1817 newCallLocal("main.main", Args{}, pathJoin(ppDir, "main.go"), 340),
1818 },
1819 },
1820 },
1821 ID: 1,
1822 First: true,
1823 },
1824 }
1825 similarGoroutines(t, want, s.Goroutines)
1826}
1827
1828func testPanicMismatched(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) {
1829 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…