Skip to content

Commit

Permalink
Test error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Jan 4, 2025
1 parent 8cc63cc commit a919573
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DifferentiationInterface/test/Back/Zygote/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ end

@testset "Errors" begin
safe_log(x) = x > zero(x) ? log(x) : convert(typeof(x), NaN)

Check warning on line 59 in DifferentiationInterface/test/Back/Zygote/test.jl

View check run for this annotation

Codecov / codecov/patch

DifferentiationInterface/test/Back/Zygote/test.jl#L59

Added line #L59 was not covered by tests
@test_throws Exception derivative(safe_log, AutoZygote(), 0.0)
@test_throws "Zygote failed to differentiate" derivative(safe_log, AutoZygote(), 0.0)
end

0 comments on commit a919573

Please sign in to comment.