Skip to content

Commit

Permalink
Also test for mutable tangent
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox committed Feb 7, 2024
1 parent bd64864 commit a52a213
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/tangent_types/structural_tangent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,11 @@ end
a = Tangent{Tuple{Float64, Float64}}(2.0, 3.0)
b = Tangent{Tuple{Float64, Float64}}(1.0, 1.0)
@test (a - b) == Tangent{Tuple{Float64, Float64}}(1.0, 2.0)

a = MutableTangent{MFoo}(x=1.5, y=1.5)
b = MutableTangent{MFoo}(x=0.5, y=0.5)
@test (a - b) == MutableTangent{MFoo}(x=1.0, y=1.0)

end

@testset "scaling" begin
Expand Down

0 comments on commit a52a213

Please sign in to comment.