Skip to content

Commit

Permalink
Add Values method to PathStep
Browse files Browse the repository at this point in the history
Some of the value information is already in the path (e.g., MapIndex.Key
and SliceIndex.Key), which seems to suggest that all of the value information
should be in the Path. Doing so has several benefits:
	* It simplifies the comparison logic
	* It paves the way for FilterPath to be able to ignore missing
	slice elements or map entries
	* It allows for a simpler API for custom reporters

One regression introduced by this change is the removal of batching for
slices when sufficient number of elements differ. This logic was added
as a hack in the past to keep the reporter output small in such cases.
However, this batching functionality should be the responsibility of the
reporter logic, not the comparer logic. A future change will refactor
the reporter logic to reintroduce that feature.
  • Loading branch information
dsnet committed Feb 26, 2019
1 parent 3e44f05 commit 8a4407e
Show file tree
Hide file tree
Showing 6 changed files with 303 additions and 214 deletions.
Loading

0 comments on commit 8a4407e

Please sign in to comment.