Skip to content

Commit

Permalink
more show() tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aplavin committed Jul 3, 2024
1 parent 5a7e448 commit d5520ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test_core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ end
@testset "full and compact show" begin
@test sprint(show, (@optic _.a)) == "(@o _.a)"
@test sprint(show, (@optic _.a + 1)) == "(@o _.a + 1)"
@test sprint(show, (@optic (_.a + 1) * 2)) == "(@o (_.a + 1) * 2)"
@test sprint(show, (@optic (_.a * 2) + 1)) == "(@o (_.a * 2) + 1)"
@test sprint(show, (@optic log(_.a[2]))) == "(@o log(_.a[2]))"
@test sprint(show, (@optic log(_).a[2])) == "(@o _.a[2]) ∘ log" # could be shorter, but difficult to dispatch correctly without piracy
@test sprint(show, (@optic log(_.a[2])); context=:compact => true) == "log(_.a[2])"
Expand Down

0 comments on commit d5520ac

Please sign in to comment.