diff --git a/ext/ManifoldsTestExt/tests_general.jl b/ext/ManifoldsTestExt/tests_general.jl index 7cbe9d33d1..741fd68148 100644 --- a/ext/ManifoldsTestExt/tests_general.jl +++ b/ext/ManifoldsTestExt/tests_general.jl @@ -350,14 +350,23 @@ function test_manifold( epsx = find_eps(p) for inv_retr_method in inverse_retraction_methods X = inverse_retract(M, p, p, inv_retr_method) - Y = copy(M, p, X) - inverse_retract!(M, Y, p, p, inv_retr_method) - for Z in [X, Y] + Test.@test isapprox( + M, + p, + zero_vector(M, p), + X; + atol=epsx * retraction_atol_multiplier, + rtol=retraction_atol_multiplier == 0 ? + sqrt(epsx) * retraction_rtol_multiplier : 0, + ) + if (test_inplace && is_mutating) + Y = copy(M, p, X) + inverse_retract!(M, Y, p, p, inv_retr_method) Test.@test isapprox( M, p, zero_vector(M, p), - Z; + Y; atol=epsx * retraction_atol_multiplier, rtol=retraction_atol_multiplier == 0 ? sqrt(epsx) * retraction_rtol_multiplier : 0,