|
41 | 41 | @test size(SizedArray{Tuple{4,5},Int}(undef).data) == (4, 5)
|
42 | 42 |
|
43 | 43 | # 0-element constructor
|
44 |
| - if VERSION >= v"1.1" |
45 |
| - @test (@inferred SizedArray(MMatrix{0,0,Float64}()))::SizedMatrix{0,0,Float64} == SizedMatrix{0,0,Float64}() |
46 |
| - end |
| 44 | + @test (@inferred SizedArray(MMatrix{0,0,Float64}()))::SizedMatrix{0,0,Float64} == SizedMatrix{0,0,Float64}() |
47 | 45 |
|
48 | 46 | # From Tuple
|
49 | 47 | @test @inferred(SizedArray{Tuple{2},Float64,1,1}((1,2)))::SizedArray{Tuple{2},Float64,1,1,Vector{Float64}} == [1.0, 2.0]
|
|
82 | 80 | @test convert(Matrix, SizedMatrix{2,2}([1 2;3 4])) == [1 2; 3 4]
|
83 | 81 |
|
84 | 82 | # 0-element constructor
|
85 |
| - if VERSION >= v"1.1" |
86 |
| - @test (@inferred SizedMatrix(MMatrix{0,0,Float64}()))::SizedMatrix{0,0,Float64} == SizedMatrix{0,0,Float64}() |
87 |
| - end |
| 83 | + @test (@inferred SizedMatrix(MMatrix{0,0,Float64}()))::SizedMatrix{0,0,Float64} == SizedMatrix{0,0,Float64}() |
88 | 84 | end
|
89 | 85 |
|
90 | 86 | # setindex
|
|
98 | 94 | # pointer
|
99 | 95 | @testset "pointer" begin
|
100 | 96 | @test pointer(sa) === pointer(sa.data)
|
101 |
| - if VERSION ≥ v"1.5" |
102 |
| - A = MMatrix{32,3,Float64}(undef); |
103 |
| - av1 = view(A, 1, :); |
104 |
| - av2 = view(A, :, 1); |
105 |
| - @test pointer(A) == pointer(av1) == pointer(av2) |
106 |
| - @test pointer(A, LinearIndices(A)[1,2]) == pointer(av1, 2) |
107 |
| - @test pointer(A, LinearIndices(A)[2,1]) == pointer(av2, 2) |
108 |
| - @test pointer(A, LinearIndices(A)[4,3]) == pointer(view(A, :, 3), 4) == pointer(view(A, 4, :), 3) |
109 |
| - end |
| 97 | + |
| 98 | + A = MMatrix{32,3,Float64}(undef); |
| 99 | + av1 = view(A, 1, :); |
| 100 | + av2 = view(A, :, 1); |
| 101 | + @test pointer(A) == pointer(av1) == pointer(av2) |
| 102 | + @test pointer(A, LinearIndices(A)[1,2]) == pointer(av1, 2) |
| 103 | + @test pointer(A, LinearIndices(A)[2,1]) == pointer(av2, 2) |
| 104 | + @test pointer(A, LinearIndices(A)[4,3]) == pointer(view(A, :, 3), 4) == pointer(view(A, 4, :), 3) |
110 | 105 | end
|
111 | 106 |
|
112 | 107 | @testset "vec" begin
|
|
0 commit comments