Skip to content

Commit 7b18216

Browse files
committed
further tweaked tests
1 parent 17b1c44 commit 7b18216

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

test/chainrulestests.jl

+8-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ function FiniteDifferences.to_vec(x::SkewHermitian)
2929
return v, from_vec
3030
end
3131

32-
m = 10
33-
A = skewhermitian(rand(m, m))
32+
@testset "automatic differentiation" begin
33+
m = 10
34+
inds = [1,2]
35+
A = skewhermitian(rand(m, m))
3436

35-
test_rrule(pfaffian, A)
37+
test_rrule(SkewHermitian, A )#test constructor
3638

39+
test_rrule(pfaffian, A)#test pfaffian
40+
test_rrule(pfaffian, SkewHermitian(A[inds, inds]))#test pfaffian of submatrix
41+
end

test/runtests.jl

+3-1
Original file line numberDiff line numberDiff line change
@@ -518,4 +518,6 @@ end
518518
E = eigen(B)
519519
@test E.vectors*Diagonal(E.values)*E.vectors' B
520520
end
521-
end
521+
end
522+
523+
include("chainrulestests.jl")

0 commit comments

Comments
 (0)