Skip to content

Commit 77f10e4

Browse files
author
Andy Ferris
committed
Added test for copy (forgot to add to PR)
1 parent b2d5146 commit 77f10e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/abstractarray.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@
6767
@test @inferred(reshape([1,2,3,4], Size(2,2)))::SizedArray{Tuple{2,2},Int,2,1} == [1 3; 2 4]
6868

6969
@test @inferred(vec(SMatrix{2, 2}([1 2; 3 4])))::SVector{4,Int} == [1, 3, 2, 4]
70-
@test @inferred(copy(SMatrix{2, 2}([1 2; 3 4]))) == [1 2; 3 4]
70+
end
71+
72+
@testset "copy" begin
73+
@test @inferred(copy(SMatrix{2, 2}([1 2; 3 4]))) === @SMatrix [1 2; 3 4]
74+
@test @inferred(copy(MMatrix{2, 2}([1 2; 3 4])))::MMatrix === [1 2; 3 4]
7175
end
7276

7377
@testset "full" begin

0 commit comments

Comments
 (0)