Skip to content

Commit 4b2df8c

Browse files
committed
Add tests for log and exp functions
1 parent 4552b68 commit 4b2df8c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/test_with_ladj.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,31 @@ include("getjacobian.jl")
3232
test_with_logabsdet_jacobian(log foo, x, getjacobian)
3333
end
3434

35-
@testset "getjacobian on mapped and broadcasted" begin
35+
@testset "with_logabsdet_jacobian on mapped and broadcasted" begin
3636
for f in (Base.Fix1(map, foo), Base.Fix1(broadcast, foo))
3737
for arg in (x, fill(x,), Ref(x), (x,), X)
3838
test_with_logabsdet_jacobian(f, arg, getjacobian, compare = isaprx)
3939
end
4040
end
4141
end
4242

43-
@testset "getjacobian on identity, adjoint and transpose" begin
43+
@testset "with_logabsdet_jacobian on identity, adjoint and transpose" begin
4444
for f in (identity, adjoint, transpose)
4545
for arg in (x, A)
4646
test_with_logabsdet_jacobian(f, arg, getjacobian)
4747
end
4848
end
4949
end
5050

51-
@testset "getjacobian on inv" begin
51+
@testset "with_logabsdet_jacobian on inv" begin
5252
for arg in (x, A, CA)
5353
test_with_logabsdet_jacobian(inv, arg, getjacobian)
5454
end
5555
end
56+
57+
@testset "with_logabsdet_jacobian on log and exp functions" begin
58+
for f in (exp, log, exp2, log2, exp10, log10, expm1, log1p)
59+
test_with_logabsdet_jacobian(f, x, getjacobian)
60+
end
61+
end
5662
end

0 commit comments

Comments
 (0)