Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YingboMa committed Feb 21, 2024
1 parent 0a90248 commit 0216298
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/arrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ getdef(v) = getmetadata(v, Symbolics.VariableDefaultValue)
b[3] * A[1, 3])))

D = Differential(t)
@test isequal(collect(D.(x) ~ x), map(i -> D(x[i]) ~ x[i], eachindex(x)))
@test isequal(collect(D.(x) .~ x), map(i -> D(x[i]) ~ x[i], eachindex(x)))
@test_throws ArgumentError A ~ t
@test isequal(D(x[1]), D(x)[1])
a = Symbolics.unwrap(D(x)[1])
@test Symbolics.operation(a) == D
@test isequal(only(Symbolics.arguments(a)), Symbolics.unwrap(x[1]))

# #448
@test isequal(Symbolics.scalarize(u + u), [2u[1]])
Expand Down

0 comments on commit 0216298

Please sign in to comment.