Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses:
reflect.Value
which will usefmt.Stringer
if implementedTimePrecision
will useTruncate
ontime.Duration
andtime.Time
if non-zero)Equal(bType) bool
will be called for all kinds of types, not juststruct
s)CanInterface
before callingError() string
on errors)CompareFunctions
is true,deep.Equal
will compare functions the same asreflect.DeepEqual
)a.Pointer
orb.Pointer
have already been seen.)Additional edge-cases #48
Equal(bType) (…)
to ensure it returns abool
kind, before executing it and panicking on it being non-BoolElem()
, we check to see if they arenil
first, and allows more clarity between getting a zeroreflect.Value
vs having a typed-pointer that is nil. (This means differences are reported as<nil pointer != *bType
rather than<nil pointer> != bType
.)nil
value assigned into aninterface
) the difference will be reported as<untyped nil> != b
shouldBeEqual
vsshouldBeDiffs
, and using deterministic values fortime.Time
comparisons rather thantime.Now()
so we can test the actual output of the tests, rather than focusing only on “differences were found”.