Skip to content

Commit 6f6996f

Browse files
committed
Add one more gradient test
1 parent 728d776 commit 6f6996f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/StdTest.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ end
352352
@test to_std_string(gradient(sum(x .^ 2), x)) == "2x"
353353
@test to_std_string(gradient(sum(x .^ 3), x)) == "3x²"
354354
@test to_std_string(gradient(sum(x)^2, x)) == "2sum(xᵀ)vec(1)"
355+
@test to_std_string(gradient(sum(x .^ 2)^2, x)) == "2sum(xᵀ²)2x"
355356
@test to_std_string(gradient(sum((x + y) .^ 2), x)) == "2(x + y)"
356357
@test to_std_string(gradient(sum((x .* y) .^ 2), x)) == "2(x ⊙ y ⊙ y)"
357358
@test to_std_string(gradient(sum((A * x - y) .^ 2), x)) == "2Aᵀ(Ax - y)"

0 commit comments

Comments
 (0)