Skip to content

Commit f0902e3

Browse files
Simone Carlo Suracesimsurace
authored andcommitted
Add tests for rrule
1 parent 5bb9766 commit f0902e3

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

test/rulesets/LinearAlgebra/dense.jl

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,18 @@
161161
end
162162
@testset "kron" begin
163163
@testset "AbstractVecOrMat{$T}" for T in (Float64, ComplexF64)
164-
test_frule(kron, randn(T, 3), randn(T, 3))
165-
test_frule(kron, randn(T, 3, 2), randn(T, 3))
166-
test_frule(kron, randn(T, 3), randn(T, 3, 4))
167-
test_frule(kron, randn(T, 3, 4), randn(T, 2, 2))
164+
@testset "frule" begin
165+
test_frule(kron, randn(T, 3), randn(T, 3))
166+
test_frule(kron, randn(T, 3, 2), randn(T, 3))
167+
test_frule(kron, randn(T, 3), randn(T, 3, 4))
168+
test_frule(kron, randn(T, 3, 4), randn(T, 2, 2))
169+
end
170+
@testset "rrule" begin
171+
test_rrule(kron, randn(T, 3), randn(T, 3))
172+
test_rrule(kron, randn(T, 3, 2), randn(T, 3))
173+
test_rrule(kron, randn(T, 3), randn(T, 3, 4))
174+
test_rrule(kron, randn(T, 3, 4), randn(T, 2, 2))
175+
end
168176
end
169177
end
170178
end

0 commit comments

Comments
 (0)