Skip to content

Commit

Permalink
add test for foldr on one element range (#22085)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored May 26, 2017
1 parent 6071f1a commit 64cb7e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/reduce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,6 @@ end
test18695(r) = sum( t^2 for t in r )
@test @inferred(test18695([1.0,2.0,3.0,4.0])) == 30.0
@test_throws ArgumentError test18695(Any[])

# issue #21107
@test foldr(-,2:2) == 2

0 comments on commit 64cb7e0

Please sign in to comment.