Skip to content

Commit f0fed56

Browse files
Added tests for MArray construction
1 parent 6ce154d commit f0fed56

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/code.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ test_repr(a, b) = @test repr(Base.remove_linenums!(a)) == repr(Base.remove_linen
119119

120120
@test eval(toexpr(Let([a 1, b 2, arr @SLVector((:a, :b))(@SVector[1,2])],
121121
MakeArray([a+b,a/b], arr)))) === @SLVector((:a, :b))(@SVector [3, 1/2])
122+
123+
R1 = eval(toexpr(Let([a 1, b 2, arr @MVector([1,2])],MakeArray([a,b,a+b,a/b], arr))))
124+
@test R1 == (@MVector [1, 2, 3, 1/2]) && R1 isa MVector
125+
126+
R2 = eval(toexpr(Let([a 1, b 2, arr @MVector([1,2])],MakeArray([a b;a+b a/b], arr))))
127+
@test R2 == (@MArray [1 2; 3 1/2]) && R2 isa MMatrix
122128

123129
mksp = MakeSparseArray(sparse([1,2,31,32,2],
124130
[1,2,31,32,2],

0 commit comments

Comments
 (0)