From f7465c8c3cf46f405e61f076ce3a97baef043464 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Tue, 17 Dec 2024 20:51:53 +0530 Subject: [PATCH] Tests for combinations of `OneTo` and `Colon` (#41069) --- test/abstractarray.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/abstractarray.jl b/test/abstractarray.jl index 9f2221d642138..ce4ca212ad20f 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -2209,6 +2209,10 @@ end @test axes(C, 1) == 1:4 @test C == CartesianIndex.([(1,1), (2,1), (1,2), (2,2)]) end +@testset "reshape with OneTo and Colon" begin + @test reshape(1:3, Base.OneTo(1), :) == reshape(1:3, 1, 3) + @test reshape(1:3, Base.OneTo(1), :, 1) == reshape(1:3, 1, 3, 1) +end @testset "AbstractArrayMath" begin @testset "IsReal" begin A = [1, 2, 3, 4]