Skip to content

Commit 5d95bd1

Browse files
committed
add tests for relstep and absstep
1 parent 716acbe commit 5d95bd1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/dense.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,18 @@ end
6767
@test ad.fdtype === Val(:forward)
6868
@test ad.fdjtype === Val(:forward)
6969
@test ad.fdhtype === Val(:hcentral)
70+
@test ad.relstep === nothing
71+
@test ad.absstep === nothing
7072

71-
ad = AutoFiniteDiff(; fdtype = Val(:central), fdjtype = Val(:forward))
73+
ad = AutoFiniteDiff(; fdtype = Val(:central), fdjtype = Val(:forward), relstep = 1e-3, absstep = 1e-3)
7274
@test ad isa AbstractADType
7375
@test ad isa AutoFiniteDiff
7476
@test mode(ad) isa ForwardMode
7577
@test ad.fdtype === Val(:central)
7678
@test ad.fdjtype === Val(:forward)
7779
@test ad.fdhtype === Val(:hcentral)
80+
@test ad.relstep == 1e-3
81+
@test ad.absstep == 1e-3
7882
end
7983

8084
@testset "AutoFiniteDifferences" begin

0 commit comments

Comments
 (0)