@@ -325,6 +325,23 @@ test_many_wrappers(fill(1.0, 5, 3), (identity, wrapper)) do a_
325325        @test  r[goodinds... ] ==  - 5 
326326    end 
327327end 
328+ 
329+ let  a =  rand (ComplexF32, 5 )
330+     r =  reinterpret (reshape, Float32, a)
331+     ref =  Array (r)
332+ 
333+     @test  r[1 , :, 1 ]        ==  ref[1 , :]
334+     @test  r[1 , :, 1 , 1 , 1 ]  ==  ref[1 , :]
335+     @test  r[1 , :, UInt8 (1 )] ==  ref[1 , :]
336+ 
337+     r[2 , :, 1 ] .=  0f0 
338+     ref[2 ,  :] .=  0f0 
339+     @test  r[2 , :, 1 ] ==  ref[2 , :]
340+ 
341+     @test  r[4 ] ==  ref[4 ]
342+     @test_throws  BoundsError r[1 , :, 2 ]
343+ end 
344+ 
328345let  ar =  [(1 ,2 ), (3 ,4 )]
329346    arr =  reinterpret (reshape, Int, ar)
330347    @test  @inferred (IndexStyle (arr)) ==  Base. IndexSCartesian2 {2} ()
@@ -612,3 +629,9 @@ let R = reinterpret(reshape, Float32, ComplexF32[1.0f0+2.0f0*im, 4.0f0+3.0f0*im]
612629    @test  ! isassigned (R, 5 )
613630    @test  Array (R):: Matrix{Float32}  ==  [1.0f0  4.0f0 ; 2.0f0  3.0f0 ]
614631end 
632+ 
633+ @testset  " issue #54623" begin 
634+     x =  0xabcdef01234567 
635+     @test  reinterpret (reshape, UInt8, fill (x)) ==  [0x67 , 0x45 , 0x23 , 0x01 , 0xef , 0xcd , 0xab , 0x00 ]
636+     @test  reinterpret (reshape, UInt8, [x]) ==  [0x67 ; 0x45 ; 0x23 ; 0x01 ; 0xef ; 0xcd ; 0xab ; 0x00 ;;]
637+ end 
0 commit comments