Skip to content

Commit

Permalink
Re-wake old test.
Browse files Browse the repository at this point in the history
  • Loading branch information
N5N3 committed Aug 10, 2022
1 parent 81a7ee2 commit a6d766e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/arrayops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1203,10 +1203,9 @@ end
@test o == fill(1, 3, 4)

# issue #18524
# m = mapslices(x->tuple(x), [1 2; 3 4], dims=1) # see variations of this below
# ERROR: fatal error in type inference (type bound), https://github.com/JuliaLang/julia/issues/43064
# @test m[1,1] == ([1,3],)
# @test m[1,2] == ([2,4],)
m = mapslices(x->tuple(x), [1 2; 3 4], dims=1) # see variations of this below
@test m[1,1] == ([1,3],)
@test m[1,2] == ([2,4],)

r = rand(Int8, 4,5,2)
@test vec(mapslices(repr, r, dims=(2,1))) == map(repr, eachslice(r, dims=3))
Expand All @@ -1216,8 +1215,6 @@ end
# failures
@test_broken @inferred(mapslices(tuple, [1 2; 3 4], dims=1)) == [([1, 3],) ([2, 4],)]
@test_broken @inferred(mapslices(transpose, r, dims=(1,3))) == permutedims(r, (3,2,1))
# ERROR: fatal error in type inference (type bound), https://github.com/JuliaLang/julia/issues/43064
@test_broken @inferred(mapslices(x -> tuple(x), [1 2; 3 4], dims=1)) == [([1, 3],) ([2, 4],)]

# re-write, #40996
@test_throws ArgumentError mapslices(identity, rand(2,3), dims=0) # previously BoundsError
Expand Down

0 comments on commit a6d766e

Please sign in to comment.