Skip to content

Commit 489b9c7

Browse files
committed
Test that MArray self-conversion doesn't copy
1 parent fb67ea4 commit 489b9c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/core.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@
105105
@test @inferred(convert(SArray{Tuple{1},Float64}, ma_int)) === sa_float
106106
@test @inferred(convert(SArray{Tuple{1},Float64,1}, ma_int)) === sa_float
107107
@test @inferred(convert(SArray{Tuple{1},Float64,1,1}, ma_int)) === sa_float
108+
109+
# Self-conversion returns the matrix itself
110+
@test convert(MArray, ma_int) === ma_int
111+
@test convert(MArray, ma_float) === ma_float
108112
end
109113

110114
@testset "AbstractArray conversion" begin

0 commit comments

Comments
 (0)