Skip to content

Commit

Permalink
fix tests on 1.10
Browse files Browse the repository at this point in the history
Only one minor regression: in allocations when the compose order is right-associative
  • Loading branch information
aplavin committed Jan 4, 2024
1 parent 4653ccc commit 3ef2dde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 3 additions & 1 deletion test/perf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ end
println("Right associative composition: $b_right")

@test b_default.allocs == 0
if VERSION >= v"1.7"
if VERSION >= v"1.10-"
@test_broken b_right.allocs == 0
elseif VERSION >= v"1.7"
@test b_right.allocs == 0
else
@test_broken right.allocs == 0
Expand Down
11 changes: 4 additions & 7 deletions test/test_core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,10 @@ end
((@optic _.b.a.b[end]), 4.0),
((@optic _.b.a.b[end÷2+1]), 4.0),
]
if VERSION < v"1.7"
@test begin
@inferred lens(obj)
@inferred set(obj, lens, val)
@inferred modify(identity, obj, lens)
true
end
if VERSION < v"1.7" || VERSION >= v"1.10-"
@inferred lens(obj)
@inferred set(obj, lens, val)
@inferred modify(identity, obj, lens)
else
@inferred lens(obj)
@inferred set(obj, lens, val)
Expand Down

0 comments on commit 3ef2dde

Please sign in to comment.