Skip to content

Commit

Permalink
Merge df6eb2e into b790146
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Jul 26, 2020
2 parents b790146 + df6eb2e commit 82b7cbd
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion test/test_broadcasting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,26 @@ sample_foldl_allocations(repeat::Integer, args...) =
baseline = minimum(sample_foldl_allocations(100, args..., xs))
repeat10x = minimum(sample_foldl_allocations(100, args..., repeat(xs, 10)))
@debug "estimated allocations" baseline repeat10x repeat10x / baseline
@test repeat10x < 2 * baseline

# Always construct the messages to avoid introducing bugs.
success_msg = """
The test `repeat10x < 2 * baseline` works in Julia $(VERSION)!
**Consider enabling this test again.**
"""
skip_msg = """
The test `repeat10x < 2 * baseline` does not work in Julia $(VERSION).
Skipping this test.
"""
if VERSION >= v"1.6-"
if repeat10x < 2 * baseline
@info success_msg baseline repeat10x repeat10x / baseline
else
@info skip_msg baseline repeat10x repeat10x / baseline
end
@test_skip repeat10x < 2 * baseline
else
@test repeat10x < 2 * baseline
end
end

end # module

0 comments on commit 82b7cbd

Please sign in to comment.