From a52a213576d50701e2a98fe30d60bb7baae334a9 Mon Sep 17 00:00:00 2001 From: Frames White Date: Wed, 7 Feb 2024 10:50:14 +0800 Subject: [PATCH] Also test for mutable tangent --- test/tangent_types/structural_tangent.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/tangent_types/structural_tangent.jl b/test/tangent_types/structural_tangent.jl index 0cd06a16d..40b1e2a56 100644 --- a/test/tangent_types/structural_tangent.jl +++ b/test/tangent_types/structural_tangent.jl @@ -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