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

Function zapArgs

stack/stack_test.go:492–517  ·  view source on GitHub ↗
(t *testing.T, want, got *Args)

Source from the content-addressed store, hash-verified

490}
491
492func zapArgs(t *testing.T, want, got *Args) {
493 if len(want.Values) != len(got.Values) {
494 t.Helper()
495 t.Error("different Args.Values length")
496 return
497 }
498 if len(want.Values) != 0 {
499 t.Helper()
500 }
501 for i := range want.Values {
502 if want.Values[i].Value != 0 && got.Values[i].Value != 0 {
503 want.Values[i].Value = 42
504 got.Values[i].Value = 42
505 }
506 if want.Values[i].IsAggregate && got.Values[i].IsAggregate {
507 zapArgs(t, &want.Values[i].Fields, &got.Values[i].Fields)
508 }
509 if want.Values[i].Name != "" && got.Values[i].Name != "" {
510 want.Values[i].Name = "foo"
511 got.Values[i].Name = "foo"
512 }
513 if want.Values[i].IsInaccurate && !got.Values[i].IsInaccurate {
514 want.Values[i].IsInaccurate = false
515 }
516 }
517}
518
519func compareGoroutines(t *testing.T, want, got []*Goroutine) {
520 if diff := cmp.Diff(want, got); diff != "" {

Callers 1

zapCallsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…