Skip to content

Commit 2ccf8cf

Browse files
committed
Update tests
1 parent 01998cd commit 2ccf8cf

File tree

7 files changed

+11
-2
lines changed

7 files changed

+11
-2
lines changed

test/basekernels/constant.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
# Standardised tests.
1010
TestUtils.test_interface(k, Float64)
11+
test_params(k, (Float64[],))
1112
test_ADs(ZeroKernel)
1213
end
1314
@testset "WhiteKernel" begin
@@ -21,6 +22,7 @@
2122

2223
# Standardised tests.
2324
TestUtils.test_interface(k, Float64)
25+
test_params(k, (Float64[],))
2426
test_ADs(WhiteKernel)
2527
end
2628
@testset "ConstantKernel" begin
@@ -32,10 +34,10 @@
3234
@test metric(ConstantKernel()) == KernelFunctions.Delta()
3335
@test metric(ConstantKernel(; c=2.0)) == KernelFunctions.Delta()
3436
@test repr(k) == "Constant Kernel (c = $(c))"
35-
test_params(k, ([log(c)],))
3637

3738
# Standardised tests.
3839
TestUtils.test_interface(k, Float64)
40+
test_params(k, ([log(c)],))
3941
test_ADs(c -> ConstantKernel(; c=first(c)), [c])
4042
end
4143
end

test/basekernels/cosine.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919

2020
# Standardised tests.
2121
TestUtils.test_interface(k, Vector{Float64})
22+
test_params(k, (Float64[],))
2223
test_ADs(CosineKernel)
2324
end

test/basekernels/exponential.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
# Standardised tests.
2323
TestUtils.test_interface(k)
24+
test_params(k, (Float64[],))
2425
test_ADs(SEKernel)
2526
end
2627
@testset "ExponentialKernel" begin
@@ -39,6 +40,7 @@
3940

4041
# Standardised tests.
4142
TestUtils.test_interface(k)
43+
test_params(k, (Float64[],))
4244
test_ADs(ExponentialKernel)
4345
end
4446
@testset "GammaExponentialKernel" begin

test/basekernels/exponentiated.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313

1414
# Standardised tests. This kernel appears to be fairly numerically unstable.
1515
TestUtils.test_interface(k; atol=1e-3)
16+
test_params(k, (Float64[],))
1617
test_ADs(ExponentiatedKernel)
1718
end

test/basekernels/matern.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
# Standardised tests.
4141
TestUtils.test_interface(k, Float64)
42+
test_params(k, (Float64[],))
4243
test_ADs(Matern32Kernel)
4344
end
4445
@testset "Matern52Kernel" begin
@@ -58,6 +59,7 @@
5859

5960
# Standardised tests.
6061
TestUtils.test_interface(k, Float64)
62+
test_params(k, (Float64[],))
6163
test_ADs(Matern52Kernel)
6264
end
6365
@testset "Coherence Materns" begin

test/basekernels/nn.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77

88
# Standardised tests.
99
TestUtils.test_interface(k, Float64)
10+
test_params(k, (Float64[],))
1011
test_ADs(NeuralNetworkKernel)
1112
end

test/basekernels/piecewisepolynomial.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@
3333
TestUtils.test_interface(k, RowVecs{Float64}; dim_in=2)
3434
test_ADs(() -> PiecewisePolynomialKernel{degree}(; dim=D))
3535

36-
test_params(k, ())
36+
test_params(k, (Float64[],))
3737
end

0 commit comments

Comments
 (0)