Skip to content

Commit a19acc9

Browse files
committed
fix invalid tests
1 parent 121bc7f commit a19acc9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/runtests.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,34 +45,34 @@ end
4545

4646
@testset "docstring" begin
4747
@test docstring(Foo(1,'x')) == "Foo"
48-
@test docstring(Fruit.RedApple()) == "Main.Fruit.RedApple"
48+
@test docstring(Fruit.RedApple(4)) == "Main.Fruit.RedApple{Int64}"
4949
end
5050

5151
@testset "hyperparameter_ranges" begin
5252
@test hyperparameter_ranges(Foo(1, 'x')) == (nothing, nothing)
53-
@test hyperparameter_ranges(Fruit.RedApple()) == ()
53+
@test hyperparameter_ranges(Fruit.RedApple(4)) == (nothing, )
5454
end
5555

5656
@testset "name" begin
5757
@test name(Float64) == "Float64"
5858
@test name(Fruit.RedApple) == "RedApple"
59-
@test name(Fruit.RedApple()) == "RedApple"
59+
@test name(Fruit.RedApple(4)) == "RedApple"
6060
end
6161

6262
@testset "human_name" begin
6363
@test human_name(AbstractString) == "abstract string"
6464
@test human_name(Fruit.RedApple) == "red apple"
65-
@test human_name(Fruit.RedApple()) == "red apple"
65+
@test human_name(Fruit.RedApple(4)) == "red apple"
6666
end
6767

6868
@testset "hyperparameters" begin
6969
@test hyperparameters(Foo(1, 'x')) == (:x, :y)
70-
@test hyperparameters(Fruit.RedApple()) == ()
70+
@test hyperparameters(Fruit.RedApple(4)) == (:x, )
7171
end
7272

7373
@testset "hyperparameter_types" begin
7474
@test hyperparameter_types(Foo(1, 'x')) == ("Int64", "Char")
75-
@test hyperparameter_types(Fruit.RedApple()) == ()
75+
@test hyperparameter_types(Fruit.RedApple(4)) == ("Int64", )
7676
end
7777

7878

@@ -88,7 +88,7 @@ const NONCONSTANT = [:docstring,
8888
@testset "traits with constant fall-back" begin
8989
for trait in setdiff(StatisticalTraits.TRAITS, NONCONSTANT)
9090
ex = quote
91-
a = $trait(Fruit.RedApple())
91+
a = $trait(Fruit.RedApple(4))
9292
b = $trait(Foo(1, 'x'))
9393
if ismissing(a)
9494
@test ismissing(b)

0 commit comments

Comments
 (0)