Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 73591f7

Browse files
author
Langwen Huang
committed
add tests
1 parent f724afa commit 73591f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/test_ad.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ forwarddiff_color_jacobian!(_J1, f, x, colorvec = repeat(1:3,10))
106106
fcalls = 0
107107
_J1 = forwarddiff_color_jacobian(oopf, x, colorvec = repeat(1:3,10), sparsity = _J, jac_prototype = _J)
108108
@test _J1 J
109+
@test typeof(_J1) == typeof(_J)
109110
@test fcalls == 1
110111

111112
@info "third passed"
@@ -146,6 +147,7 @@ _nsqJ = forwarddiff_color_jacobian(nsqf, x, colorvec = repeat(1:3,10), sparsity
146147
@test _nsqJ nsqJ
147148
_nsqJ = forwarddiff_color_jacobian(nsqf, x, jac_prototype = SMatrix{15,30}(nsqJ))
148149
@test _nsqJ nsqJ
150+
@test typeof(_nsqJ) == typeof(SMatrix{15,30}(nsqJ))
149151
_nsqJ = forwarddiff_color_jacobian(staticnsqf, SVector{30}(x), jac_prototype = SMatrix{15,30}(nsqJ))
150152
@test _nsqJ nsqJ
151153
_nsqJ = forwarddiff_color_jacobian(staticnsqf, SVector{30}(x), jac_prototype = SMatrix{15,30}(nsqJ), colorvec = repeat(1:3,10), sparsity = spnsqJ)

0 commit comments

Comments
 (0)