Skip to content

Commit 7c61851

Browse files
committed
improve a msg
1 parent f70767e commit 7c61851

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "WhyNotEqual"
22
uuid = "e6125b7d-2298-432f-af45-a1235af9403e"
33
authors = ["Jan Weidner <jw3126@gmail.com> and contributors"]
4-
version = "0.2.0"
4+
version = "0.2.1"
55

66
[deps]
77
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"

src/WhyNotEqual.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function Base.show(io::IO, res::ChildrenTraitMismatch)
6060
println(io, "These have different child traits.")
6161
t1 = ChildrenT(res.obj1)
6262
t2 = ChildrenT(res.obj2)
63+
println(io, "lens: ", repr(res.lens))
6364
println(io, "ChildrenT(obj1) = ", t1)
6465
println(io, "ChildrenT(obj2) = ", t2)
6566
end

test/runtests.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ end
110110

111111
@test whynot(==, AB(1,2), AB(1,[2])) isa WN.ChildrenTraitMismatch
112112
@test whynot(==, AB(1,2), AB(1,[2])).lens === (@optic _.b)
113+
res = whynot(==, AB(1,2), AB(1,[2]))
114+
s = sprint(show,res)
115+
@test occursin("lens", s)
116+
@test occursin("@optic", s)
117+
@test occursin("_.b", s)
113118

114119
@testset "readme" begin
115120
expected = (

0 commit comments

Comments
 (0)