Skip to content

Commit

Permalink
Put back prod(Vector{Bool}) test but for new behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasnoack committed Jan 14, 2016
1 parent b727100 commit 2d03a92
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/reduce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ end
@test prod(1:big(16)) == big(20922789888000)
@test prod(big(typemax(Int64)):big(typemax(Int64))+16) == parse(BigInt,"25300281663413827620486300433089141956148633919452440329174083959168114253708467653081909888307573358090001734956158476311046124934597861626299416732205795533726326734482449215730132757595422510465791525610410023802664753402501982524443370512346073948799084936298007821432734720004795146875180123558814648586972474376192000")

@test typeof(prod(bitunpack(trues(10)))) == Bool

# check type-stability
prod2(itr) = invoke(prod, Tuple{Any}, itr)
@test prod(Int[]) === prod2(Int[]) === 1
Expand Down

1 comment on commit 2d03a92

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great thanks

Please sign in to comment.