Skip to content

Commit 6354bb8

Browse files
oscardssmithtansongchen
authored andcommitted
add test
1 parent f09f94d commit 6354bb8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/derivative.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ end
2626
@testset "O-function, I-derivative" begin
2727
g(x) = x .^ 2
2828
@test derivative!(zeros(2), g, [1.0, 2.0], [1.0, 0.0], Val(1)) [2.0, 0.0]
29+
gzero(x) = [1.0, 1.0]
30+
@test derivative!(zeros(2), gzero, [1.0, 2.0], [1.0, 0.0], Val(1)) == [0.0, 0.0]
2931
end
3032

3133
@testset "I-function, I-derivative" begin

0 commit comments

Comments
 (0)