Skip to content

Commit

Permalink
version bound on test
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreener64 committed Apr 15, 2024
1 parent c6202b8 commit 12ab3fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/internal_rules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ end
end

@test autodiff(Forward, f4, Duplicated(1.5, 1.0))[1] == 1.5
@test autodiff(Forward, f4, BatchDuplicated(1.5, (1.0, 2.0)))[1] == (var"1"=1.5, var"2"=3.0)
@static if v"1.7-" <= VERSION < v"1.8-"
@test autodiff(Forward, f4, BatchDuplicated(1.5, (1.0, 2.0)))[1] == (var"1"=1.5, var"2"=3.0)
end
@test autodiff(Reverse, f4, Active(1.5))[1][1] == 1.5
@test autodiff(Reverse, f4, Active(4.0))[1][1] == 0.5
@test autodiff(Reverse, f4, Active(6.0))[1][1] == 0.0
Expand Down

0 comments on commit 12ab3fe

Please sign in to comment.