Skip to content

Commit d42e596

Browse files
fix tests for tree shortening
1 parent 961c1e5 commit d42e596

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/derivatives.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ expand_derivatives(dsin)
1111

1212
@test expand_derivatives(dsin) == cos(t)
1313
dcsch = D*csch(t)
14-
@test expand_derivatives(dcsch) == Operation(-1*coth(t)*csch(t))
14+
@test expand_derivatives(dcsch) == simplify_constants(Operation(coth(t)*csch(t)*-1))
15+
1516
# Chain rule
1617
dsinsin = D*sin(sin(t))
1718
@test expand_derivatives(dsinsin) == cos(sin(t))*cos(t)
@@ -24,7 +25,7 @@ dpow2 = Derivative(^,[x, y],Val{2})
2425
d1 = D*(sin(t)*t)
2526
d2 = D*(sin(t)*cos(t))
2627
@test expand_derivatives(d1) == t*cos(t)+sin(t)
27-
@test expand_derivatives(d2) == cos(t)*cos(t)+sin(t)*(-1*sin(t))
28+
@test expand_derivatives(d2) == simplify_constants(cos(t)*cos(t)+sin(t)*(-1*sin(t)))
2829

2930
eqs = [0 ~ σ*(y-x),
3031
0 ~ x*-z)-y,

0 commit comments

Comments
 (0)