Skip to content

Commit

Permalink
fix CI on 1.5 (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzgubic authored Sep 12, 2022
1 parent 4f4d5f0 commit f6123ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/projection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ struct NoSuperType end

@testset "Base: Tuple" begin
pt1 = ProjectTo((1.0,))
@test @inferred(pt1((1 + im,))) == Tangent{Tuple{Float64}}(1.0,)
@test @inferred(pt1(pt1((1,)))) == pt1(pt1((1,))) # accepts correct Tangent
@test @inferred(pt1(Tangent{Any}(1))) == pt1((1,)) # accepts Tangent{Any}
if VERSION >= v"1.6"
@test @inferred(pt1((1 + im,))) == Tangent{Tuple{Float64}}(1.0)
@test @inferred(pt1(pt1((1,)))) == pt1(pt1((1,))) # accepts correct Tangent
@test @inferred(pt1(Tangent{Any}(1))) == pt1((1,)) # accepts Tangent{Any}
end
@test pt1([1,]) == Tangent{Tuple{Float64}}(1.0,) # accepts Vector
@test @inferred(pt1(NoTangent())) === NoTangent()
@test @inferred(pt1(ZeroTangent())) === ZeroTangent()
Expand Down

0 comments on commit f6123ee

Please sign in to comment.