Skip to content

Commit 0adf895

Browse files
committed
Fix tests of Base
1 parent cdabf24 commit 0adf895

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_base.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ end
2525

2626
@testset "any" begin
2727
ctree = copy(tree)
28-
@test any(t.degree == 2, ctree)
28+
@test any(t -> t.degree == 2, ctree)
2929
@test any(_ -> true, ctree)
3030
@test any(t -> t.degree == 0 && t.constant && t.val == 3.2, ctree)
3131
@test !any(t -> t.degree == 0 && t.constant && t.val == 3.3, ctree)
3232
end
3333

3434
@testset "collect" begin
3535
ctree = copy(tree)
36-
@test first(collect(ctree)) == Node{Float64}
36+
@test typeof(first(collect(ctree))) == Node{Float64}
3737
@test objectid(first(collect(ctree))) == objectid(ctree)
3838
@test objectid(first(collect(ctree))) == objectid(ctree)
3939
@test objectid(first(collect(ctree))) == objectid(ctree)
@@ -55,8 +55,8 @@ end
5555
@testset "filter" begin
5656
ctree = copy(tree)
5757
@test filter(_ -> true, ctree) == collect(ctree)
58-
@test length(filter(t -> t.degree == 0 && !t.constant)) == 6
59-
@test unique(filter(t -> t.degree == 0 && !t.constant)) == [x1, x2, x3]
58+
@test length(filter(t -> t.degree == 0 && !t.constant, ctree)) == 6
59+
@test unique(filter(t -> t.degree == 0 && !t.constant, ctree)) == [x1, x2, x3]
6060
@test length(filter(t -> t.degree == 1, ctree)) == 1
6161
@test length(filter(t -> t.degree == 2, ctree)) == 11
6262
@test filter(==(x1), ctree) == [x1, x1, x1]

0 commit comments

Comments
 (0)