Skip to content

Commit

Permalink
make tests more safe.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Oct 20, 2023
1 parent e673e69 commit b978606
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions ext/ManifoldsTestExt/tests_general.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 364 in ext/ManifoldsTestExt/tests_general.jl

View check run for this annotation

Codecov / codecov/patch

ext/ManifoldsTestExt/tests_general.jl#L363-L364

Added lines #L363 - L364 were not covered by tests
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,
Expand Down

0 comments on commit b978606

Please sign in to comment.