Ever encountered a situation like this:
@test expected == result
Test Failed at /home/jan/.julia/dev/WhyNotEqual/doit.jl:21
Expression: expected == result
Evaluated: (v = (hello = :world, language = :julia), w = 42, x = [1, 2, 3, 4, 5], y = AB(1, 2),
z = Dict{AB, Any}(AB(2, 3) => AB(3, ()), AB(1, 2) => 3), zz = (foo = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10
… 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], bar = :bar)) == (v = (hello = :world, language = :ju
lia), w = 42, x = [1, 2, 3, 4, 5], y = AB(1, 2), z = Dict{AB, Any}(AB(2, 3) => AB(4, ()), AB(1, 2)
=> 3), zz = (foo = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], bar
= :bar))
ERROR: LoadError: There was an error during testing
Can you spot the difference? This WhyNotEqual.jl can do it for you:
using WhyNotEqual
whynot(==, expected, result)
DifferentAndNoChildren: When applying `lens` to both objects, we get `obj1` and `obj2`.
obj1 and obj2 are different, but they don't have any children.
lens: (@optic _.z[AB(2, 3)].a)
obj1: 3
obj2: 4