Skip to content

Commit

Permalink
add a test for #30739 (#36395)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Jun 25, 2020
1 parent 0a661f9 commit a850b7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/compiler/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -444,3 +444,10 @@ function _handle_message_test()
return _handle_progress_test(progress)
end
@test _handle_message_test() isa Tuple{Base.UUID, String}

@testset "#30739" begin
ifelsetuple(n::Integer, k::Integer, f, g) = ntuple(i -> (i <= k ? f : g), n)
f(x) = x^2; g(x) = x^3;
a = [1]; b = [2]
@test ifelsetuple(5, 3, a, b) == ([1], [1], [1], [2], [2])
end

0 comments on commit a850b7e

Please sign in to comment.