Skip to content

Commit b2e5e85

Browse files
committed
Support non-numerical values in test_inverse
1 parent fca5de0 commit b2e5e85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ All keyword arguments are passed to `isapprox`.
1212
function test_inverse(f, x; kwargs...)
1313
@testset "test_inverse: $f with input $x" begin
1414
inverse_f = inverse(f)
15-
@test isapprox(inverse_f(f(x)), x; kwargs...)
15+
@test (x2 = inverse_f(f(x)); x2 == x || isapprox(inverse_f(f(x)), x; kwargs...))
1616
@test inverse(inverse_f) === f
1717
end
1818
return nothing

0 commit comments

Comments
 (0)