Skip to content

Commit 6e87175

Browse files
committed
Adapt test to the previous change
1 parent 6d11970 commit 6e87175

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

test/ForwardTest.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -754,18 +754,17 @@ end
754754
@testset "Differentiate xx'x" begin
755755
x = Monomial("x", Upper(1))
756756

757-
lr = dc.BinaryOperation{dc.Mult}(Monomial("x", Lower(101)), Monomial("x", Upper(100)))
758-
l = dc.BinaryOperation{dc.Mult}(2, lr)
759-
rr = dc.BinaryOperation{dc.Mult}(
760-
dc.BinaryOperation{dc.Mult}(Monomial("x", Lower(1)), x),
761-
KrD(Upper(100), Lower(101)),
757+
l = dc.BinaryOperation{dc.Mult}(Monomial("x", Upper(100)), Monomial("x", Lower(101)))
758+
rl = dc.BinaryOperation{dc.Add}(
759+
dc.BinaryOperation{dc.Mult}(Monomial("x", Upper(100)), KrD(Lower(1), Lower(101))),
760+
dc.BinaryOperation{dc.Mult}(Monomial("x", Lower(1)), KrD(Upper(100), Lower(101))),
762761
)
763-
expected = dc.BinaryOperation{dc.Add}(l, rr)
762+
r = dc.BinaryOperation{dc.Mult}(rl, Monomial("x", Upper(1)))
763+
expected = dc.BinaryOperation{dc.Add}(l, r)
764764

765765
D = dc.diff(x * x' * x, Monomial("x", Upper(6)))
766766

767-
# TODO: Make evaluate work until the rersult doesn't change anymore
768-
@test equivalent(dc.evaluate(dc.evaluate(dc.evaluate(D))), expected)
767+
@test equivalent(dc.evaluate(D), expected)
769768
end
770769

771770
@testset "Differentiate A(x + 2x)" begin

0 commit comments

Comments
 (0)