Skip to content

Commit

Permalink
added one more test, removed useless idx_last
Browse files Browse the repository at this point in the history
  • Loading branch information
francescoalemanno committed Mar 22, 2020
1 parent f1eb11b commit 71b9e36
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 0 additions & 8 deletions src/tupletools.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
@inline function trapz_colon(k)
Colon();
end

@inline function idxlast(i,::Val{N}) where N;
Base.tail((ntuple(trapz_colon,Val(N))...,i))
end

@inline function buildaxes(T::X,A) where {N,X <: NTuple{N}}
h=first(T)
t=Base.tail(T)
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ end
end

@testset "Corner case of empty vector" begin
@test trapz(zeros(Float16,()),zeros(Float16,())) == 0.0
@test trapz(Float64[],Float64[]) == 0.0
@test trapz(Float64[1],Float64[1]) == 0.0
end
Expand Down

0 comments on commit 71b9e36

Please sign in to comment.