From 3ef2ddeea17e286b32c9e5c29738118af74fc032 Mon Sep 17 00:00:00 2001 From: Alexander Plavin Date: Wed, 27 Dec 2023 05:36:46 -0500 Subject: [PATCH] fix tests on 1.10 Only one minor regression: in allocations when the compose order is right-associative --- test/perf.jl | 4 +++- test/test_core.jl | 11 ++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/test/perf.jl b/test/perf.jl index 0d87f8a3..158d213d 100644 --- a/test/perf.jl +++ b/test/perf.jl @@ -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 diff --git a/test/test_core.jl b/test/test_core.jl index 7a64324e..dd41d8ac 100644 --- a/test/test_core.jl +++ b/test/test_core.jl @@ -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)