MCPcopy Create free account
hub / github.com/google/gapid / AddDiff

Method AddDiff

core/data/compare/comparator.go:68–70  ·  view source on GitHub ↗

AddDiff can be used by custom comparison functions to register a new difference. The current handler will be invoked with the current path plus a Diff fragment.

(reference, value interface{})

Source from the content-addressed store, hash-verified

66// AddDiff can be used by custom comparison functions to register a new difference.
67// The current handler will be invoked with the current path plus a Diff fragment.
68func (t Comparator) AddDiff(reference, value interface{}) {
69 t.Handler(t.Path.Diff(reference, value))
70}
71
72func (t Comparator) compareValues(v1, v2 reflect.Value, ptr bool) {
73 // First see if we have seen this comparison already

Callers 4

compareSpecialFunction · 0.80
compareSpecialStructFunction · 0.80
compareProtosFunction · 0.80
compareTokensFunction · 0.80

Calls 2

HandlerMethod · 0.80
DiffMethod · 0.45

Tested by 2

compareSpecialFunction · 0.64
compareSpecialStructFunction · 0.64