Skip to content

Commit a52a213

Browse files
committed
Also test for mutable tangent
1 parent bd64864 commit a52a213

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/tangent_types/structural_tangent.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,11 @@ end
370370
a = Tangent{Tuple{Float64, Float64}}(2.0, 3.0)
371371
b = Tangent{Tuple{Float64, Float64}}(1.0, 1.0)
372372
@test (a - b) == Tangent{Tuple{Float64, Float64}}(1.0, 2.0)
373+
374+
a = MutableTangent{MFoo}(x=1.5, y=1.5)
375+
b = MutableTangent{MFoo}(x=0.5, y=0.5)
376+
@test (a - b) == MutableTangent{MFoo}(x=1.0, y=1.0)
377+
373378
end
374379

375380
@testset "scaling" begin

0 commit comments

Comments
 (0)