MCPcopy
hub / github.com/google/go-cmp / Report

Method Report

cmp/report_value.go:83–104  ·  view source on GitHub ↗
(rs Result)

Source from the content-addressed store, hash-verified

81}
82
83func (r *valueNode) Report(rs Result) {
84 assert(r.MaxDepth == 0) // May only be called on leaf nodes
85
86 if rs.ByIgnore() {
87 r.NumIgnored++
88 } else {
89 if rs.Equal() {
90 r.NumSame++
91 } else {
92 r.NumDiff++
93 }
94 }
95 assert(r.NumSame+r.NumDiff+r.NumIgnored == 1)
96
97 if rs.ByMethod() {
98 r.NumCompared++
99 }
100 if rs.ByFunc() {
101 r.NumCompared++
102 }
103 assert(r.NumCompared <= 1)
104}
105
106func (child *valueNode) PopStep() (parent *valueNode) {
107 if child.parent == nil {

Callers

nothing calls this directly

Calls 5

assertFunction · 0.85
ByIgnoreMethod · 0.80
ByMethodMethod · 0.80
ByFuncMethod · 0.80
EqualMethod · 0.65

Tested by

no test coverage detected