(rs Result)
| 81 | } |
| 82 | |
| 83 | func (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 | |
| 106 | func (child *valueNode) PopStep() (parent *valueNode) { |
| 107 | if child.parent == nil { |