Descriptiontesting/checkers: more informative DeepEquals
I have spent too long delving into the output of gc.DeepEquals
results looking for differences. This changes jc.DeepEquals
to say what you want to know.
Trivial example:
c.Assert([]int{1,3,5}, jc.DeepEquals, []int{1,3,7})
produces:
tst_test.go:17:
c.Assert([]int{1, 3, 5}, jc.DeepEquals, []int{1, 3, 7})
... obtained []int = []int{1, 3, 5}
... expected []int = []int{1, 3, 7}
... mismatch at [2]: unequal; obtained 5; expected 7
https://code.launchpad.net/~rogpeppe/juju-core/481-testing-deepequals/+merge/201432
(do not edit description out of merge proposal)
Patch Set 1 #Patch Set 2 : testing/checkers: more informative DeepEquals #
Total comments: 2
Patch Set 3 : testing/checkers: more informative DeepEquals #
MessagesTotal messages: 4
|