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

Commit c6c5e08

Browse files
author
Langwen Huang
committed
add test for 1x1 svector
1 parent e5d905a commit c6c5e08

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/test_ad.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,10 @@ J = forwarddiff_color_jacobian(oopf,x)
218218
@test J Matrix(I,4,4)
219219
J = zero(J)
220220
forwarddiff_color_jacobian!(J,iipf,x,dx=similar(x))
221-
@test J Matrix(I,4,4)
221+
@test J Matrix(I,4,4)
222+
223+
#1x1 SVector test
224+
x = SVector{1}([1.])
225+
f(x) = x
226+
J = forwarddiff_color_jacobian(f,x)
227+
@test J SMatrix{1,1}([1.])

0 commit comments

Comments
 (0)