Skip to content

Commit edaf5a0

Browse files
committed
Tests for combinations of OneTo and Colon (#41069)
1 parent b16a91c commit edaf5a0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/abstractarray.jl

+4
Original file line numberDiff line numberDiff line change
@@ -2209,6 +2209,10 @@ end
22092209
@test axes(C, 1) == 1:4
22102210
@test C == CartesianIndex.([(1,1), (2,1), (1,2), (2,2)])
22112211
end
2212+
@testset "reshape with OneTo and Colon" begin
2213+
@test reshape(1:3, Base.OneTo(1), :) == reshape(1:3, 1, 3)
2214+
@test reshape(1:3, Base.OneTo(1), :, 1) == reshape(1:3, 1, 3, 1)
2215+
end
22122216
@testset "AbstractArrayMath" begin
22132217
@testset "IsReal" begin
22142218
A = [1, 2, 3, 4]

0 commit comments

Comments
 (0)