-
Notifications
You must be signed in to change notification settings - Fork 154
Closed
Labels
Description
Tests of NaN-safe mode are only run if NaN-safe mode is enabled:
ForwardDiff.jl/test/PartialsTest.jl
Lines 119 to 132 in 463e830
if ForwardDiff.NANSAFE_MODE_ENABLED | |
ZEROS = Partials((fill(zero(T), N)...,)) | |
@test (NaN * ZEROS).values == ZEROS.values | |
@test (Inf * ZEROS).values == ZEROS.values | |
@test (ZEROS / 0).values == ZEROS.values | |
@test ForwardDiff._mul_partials(ZEROS, ZEROS, X, NaN).values == ZEROS.values | |
@test ForwardDiff._mul_partials(ZEROS, ZEROS, NaN, X).values == ZEROS.values | |
@test ForwardDiff._mul_partials(ZEROS, ZEROS, X, Inf).values == ZEROS.values | |
@test ForwardDiff._mul_partials(ZEROS, ZEROS, Inf, X).values == ZEROS.values | |
@test ForwardDiff._mul_partials(ZEROS, ZEROS, Inf, NaN).values == ZEROS.values | |
@test ForwardDiff._mul_partials(ZEROS, ZEROS, NaN, Inf).values == ZEROS.values | |
end |
However, CI tests are only run without NaN-safe mode. Therefore the NaN-safe mode implementation is currently not covered by CI: https://app.codecov.io/gh/JuliaDiff/ForwardDiff.jl/blob/master/src%2Fpartials.jl#L93