Skip to content

Commit 4344987

Browse files
committed
remove complex/misc tests
1 parent a514f7d commit 4344987

File tree

2 files changed

+1
-81
lines changed

2 files changed

+1
-81
lines changed

test/gradcheck.jl

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -634,83 +634,3 @@ end
634634
# in typeassert, expected Int64, got a value of type Nothing
635635
@test_broken jacobicheck(-, A, B)
636636
end
637-
638-
639-
640-
641-
642-
643-
644-
645-
646-
647-
648-
649-
650-
651-
@testset "LinearAlgebra.det" begin
652-
@test jacobicheck(det, (4, 4))
653-
@test jacobicheck(logdet, map(x -> x*x'+I, (randn(4, 4),))[1])
654-
@test jacobicheck(x -> logabsdet(x)[1], (4, 4))
655-
@test gradient(det, 2.0)[1] == 1
656-
@test gradient(logdet, 2.0)[1] == 0.5
657-
end
658-
659-
@testset "kron" begin
660-
# FIXME: fail with
661-
# TypeError: in typeassert, expected Int64, got a value of type Nothing
662-
@test_broken jacobicheck(kron, 5, 3)
663-
@test_broken jacobicheck(kron, rand(5), rand(3), rand(8))
664-
@test_broken jacobicheck(kron, rand(5,1), rand(3,1))
665-
@test_broken jacobicheck(kron, rand(5,1), rand(3,1), rand(8,1))
666-
@test_broken jacobicheck(kron, rand(5,2), rand(3,2), rand(8,2))
667-
end
668-
669-
670-
671-
# FIXME: complex numbers; put somewhere
672-
@test gradcheck((a,b)->sum(reim(acosh(complex(a[1], b[1])))), [-2.0], [1.0])
673-
#@testset "$f(::AbstractArray)" for f in (real, conj, imag)
674-
# rng, N = MersenneTwister(123456), 3
675-
# Ts = (Float64, ComplexF64)
676-
# @testset "$f(::Array{$IT})" for IT in Ts
677-
# A = randn(IT, N, N)
678-
# y, back = Zygote.pullback(f, A)
679-
# y2, back2 = Zygote.pullback(x->f.(x), A)
680-
# @test y == y2
681-
# @testset "back(::Array{$BT})" for BT in Ts
682-
# ȳ = randn(BT, N, N)
683-
# @test back(ȳ)[1] == back2(ȳ)[1]
684-
# end
685-
# end
686-
#end
687-
688-
689-
# FIXME: misc tests
690-
@test jacobicheck(x -> x', rand(5))
691-
692-
693-
# FIXME: include those?
694-
# @testset "println, show, string, etc" begin
695-
# function foo(x)
696-
# Base.show(x)
697-
# Base.print(x)
698-
# Base.print(stdout, x)
699-
# Base.println(x)
700-
# Base.println(stdout, x)
701-
# Core.show(x)
702-
# Core.print(x)
703-
# Core.println(x)
704-
# return x
705-
# end
706-
# gradcheck(f, xs::AbstractArray...) = gradcheck((xs...) -> sum(sin.(f(xs...))), xs...)
707-
# println("The following printout is from testing that `print` doesn't upset gradients:")
708-
# @test gradcheck(foo, [5.0])
709-
#
710-
# function bar(x)
711-
# string(x)
712-
# repr(x)
713-
# return x
714-
# end
715-
# @test gradcheck(bar, [5.0])
716-
# end

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const bwd = Diffractor.PrimeDerivativeBack
2020
"forward.jl",
2121
"reverse.jl",
2222
"regression.jl",
23-
"AbstractDifferentiationTests.jl"
23+
"AbstractDifferentiationTests.jl",
2424
"gradcheck.jl"
2525
#"pinn.jl", # Higher order control flow not yet supported (https://github.com/JuliaDiff/Diffractor.jl/issues/24)
2626
)

0 commit comments

Comments
 (0)