Skip to content

Commit a8a1cf5

Browse files
committed
tests: improve testset names
1 parent a0847cd commit a8a1cf5

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

test/DerivativeTest.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const x = 1
1919

2020
@testset "Derivative test vs Calculus.jl" begin
2121

22-
@testset "$f" for f in DiffTests.NUMBER_TO_NUMBER_FUNCS
22+
@testset "$f(x::Number)::Number" for f in DiffTests.NUMBER_TO_NUMBER_FUNCS
2323
v = f(x)
2424
d = ForwardDiff.derivative(f, x)
2525
@test isapprox(d, Calculus.derivative(f, x), atol=FINITEDIFF_ERROR)
@@ -30,7 +30,7 @@ const x = 1
3030
@test isapprox(DiffResults.derivative(out), d)
3131
end
3232

33-
@testset "$f" for f in DiffTests.NUMBER_TO_ARRAY_FUNCS
33+
@testset "$f(x::Number)::Array" for f in DiffTests.NUMBER_TO_ARRAY_FUNCS
3434
v = f(x)
3535
d = ForwardDiff.derivative(f, x)
3636

@@ -47,7 +47,7 @@ end
4747
@test isapprox(DiffResults.derivative(out), d)
4848
end
4949

50-
@testset "$f!" for f! in DiffTests.INPLACE_NUMBER_TO_ARRAY_FUNCS
50+
@testset "$f!(y::Vector, x::Number)" for f! in DiffTests.INPLACE_NUMBER_TO_ARRAY_FUNCS
5151
m, n = 3, 2
5252
y = fill(0.0, m, n)
5353
f = x -> (tmp = similar(y, promote_type(eltype(y), typeof(x)), m, n); f!(tmp, x); tmp)

test/GradientTest.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ end
5959
########################
6060
@testset "Comparison vs Calculus.jl" begin
6161

62-
@testset "$f" for f in DiffTests.VECTOR_TO_NUMBER_FUNCS
62+
@testset "$f(x::Vector)::Number" for f in DiffTests.VECTOR_TO_NUMBER_FUNCS
6363
v = f(X)
6464
g = ForwardDiff.gradient(f, X)
6565
@test isapprox(g, Calculus.gradient(f, X), atol=FINITEDIFF_ERROR)

test/HessianTest.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ cfgx = ForwardDiff.HessianConfig(sin, x)
6868

6969
@testset "Comparison vs Calculus.jl" begin
7070

71-
@testset "$f" for f in DiffTests.VECTOR_TO_NUMBER_FUNCS
71+
@testset "$f(x::Vector)::Number" for f in DiffTests.VECTOR_TO_NUMBER_FUNCS
7272
v = f(X)
7373
g = ForwardDiff.gradient(f, X)
7474
h = ForwardDiff.hessian(f, X)

test/JacobianTest.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ end
104104

105105
@testset "Comparison vs Calculus.jl" begin
106106

107-
@testset "$f" for f in DiffTests.ARRAY_TO_ARRAY_FUNCS
107+
@testset "$f(x::Array)::Array" for f in DiffTests.ARRAY_TO_ARRAY_FUNCS
108108
v = f(X)
109109
j = ForwardDiff.jacobian(f, X)
110110
@test isapprox(j, Calculus.jacobian(x -> vec(f(x)), X, :forward), atol=1.3FINITEDIFF_ERROR)
@@ -126,7 +126,7 @@ end
126126
end
127127
end
128128

129-
@testset "$f!" for f! in DiffTests.INPLACE_ARRAY_TO_ARRAY_FUNCS
129+
@testset "$f!(y::Array, x::Array)" for f! in DiffTests.INPLACE_ARRAY_TO_ARRAY_FUNCS
130130
v = fill!(similar(Y), 0.0)
131131
f!(v, X)
132132
j = ForwardDiff.jacobian(f!, fill!(similar(Y), 0.0), X)

0 commit comments

Comments
 (0)