Skip to content

Commit 3d414ec

Browse files
committed
Update tests
1 parent 72bb760 commit 3d414ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/api.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ using StaticArrays
66
@test D(sin)(1.0) == cos(1.0)
77
@test D(x->[x, x^2])(3) == [1, 6]
88
@test D(sum)([1,2,3]) == ones(3)'
9-
@test D(x->@SVector([x[1]^x[2], x[3]^3, x[3]*x[2]*x[1]]))(@SVector[1,2,3.]) === @SMatrix [2.0 0 6; 0 0 3; 0 27 2]
9+
@test D(x->@SVector([x[1]^x[2], x[3]^3, x[3]*x[2]*x[1]]))(@SVector[1,2,3.]) === @SMatrix [2.0 0 0; 0 0 27; 6 3 2]
1010
@test D(cumsum)(@SVector([1,2,3])) == @SMatrix [1 0 0; 1 1 0; 1 1 1]
1111
@test D(cumsum)([1,2,3]) == [1 0 0; 1 1 0; 1 1 1]
12+
@test D(x->@SVector([x[1], x[2]]))(@SVector([1,2,3])) === @SMatrix [1 0 0; 0 1 0]
1213
end

0 commit comments

Comments
 (0)