diff --git a/test/runtests.jl b/test/runtests.jl index 1b991b5c..d9790fcd 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,4 +6,15 @@ Random.seed!(0) include("tracker.jl") +using Tracker: jacobian + +@testset "Jacobian" begin + A = param(randn(2,2)) + x = randn(2) + m(x) = A*x + y = m(x) + J = jacobian(m,x) + @test J ≈ A.data +end + end