Skip to content

Commit

Permalink
Type stable array concatenation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloferz committed Nov 24, 2016
1 parent 05b26b4 commit a244ad6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,10 @@ function test_cat(::Type{TestAbstractArray})

# 18395
@test isa(Any["a" 5; 2//3 1.0][2,1], Rational{Int})

# 13665, 19038
@test @inferred(hcat([1.0 2.0], 3))::Array{Float64,2} == [1.0 2.0 3.0]
@test @inferred(vcat([1.0, 2.0], 3))::Array{Float64,1} == [1.0, 2.0, 3.0]
end

function test_ind2sub(::Type{TestAbstractArray})
Expand Down
3 changes: 3 additions & 0 deletions test/sparse/sparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1659,3 +1659,6 @@ let X = sparse([1 -1; -1 1])
@test Y / 1 == Y
end
end

# 19304
@inferred hcat(sparse(rand(3,4)), eye(3,3))

0 comments on commit a244ad6

Please sign in to comment.