Skip to content

Commit

Permalink
Fix and test summarize being broken for tuples of length other than 2…
Browse files Browse the repository at this point in the history
… due to typo (#136)
  • Loading branch information
LilithHafner authored Nov 24, 2024
1 parent 2a3a4a9 commit dfb6b6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/statistics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ median(b::Benchmark) = elementwise(median, b)
mean(b::Benchmark) = elementwise(mean, b)
Base.maximum(b::Benchmark) = elementwise(maximum, b)

summarize(b::Tuple{<:Any, Benchmark}) = summarize.(b)
summarize(b::NTuple{<:Any, Benchmark}) = summarize.(b)
summarize(b::Benchmark) = minimum(b)
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ using Random: rand!
g(x) = (@assert !issorted(x); push!(glog, hash(x)); sort!(x; alg=InsertionSort))
@b rand!(a),copyto!(b,a) f(_[1]),g(_[2]) (@assert issorted(_::Vector{Int})) evals=1
@test flog == glog

# More than two test functions
@b 1,2,3
end

@testset "display" begin
Expand Down

0 comments on commit dfb6b6b

Please sign in to comment.