(t *testing.T, want, got *Args)
| 490 | } |
| 491 | |
| 492 | func 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 | |
| 519 | func compareGoroutines(t *testing.T, want, got []*Goroutine) { |
| 520 | if diff := cmp.Diff(want, got); diff != "" { |
no outgoing calls
no test coverage detected
searching dependent graphs…