Skip to content

Commit 946dee5

Browse files
committed
Only test error exception on v1.7 and later
1 parent 96d6609 commit 946dee5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/test_base.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,10 @@ end
167167
end
168168

169169
@testset "Unsupported" begin
170-
for func in (:reduce, :foldl, :foldr, :mapfoldl, :mapfoldr)
171-
wrapped_func(args...) = (@eval $func)(args...)
172-
@test_throws ErrorException wrapped_func(Returns(1), tree)
170+
if VERSION >= v"1.7.0"
171+
for func in (:reduce, :foldl, :foldr, :mapfoldl, :mapfoldr)
172+
wrapped_func(args...) = (@eval $func)(args...)
173+
@test_throws ErrorException wrapped_func(Returns(1), tree)
174+
end
173175
end
174176
end

0 commit comments

Comments
 (0)