Skip to content

Commit

Permalink
Include dim in mpscopy testsets
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Sep 30, 2024
1 parent b999285 commit 3a4ceb4
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions test/mps/copy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,19 @@ end
@testset "MPSMatrixCopy" begin
Ts = collect(values(MPS.jl_mps_to_typ))
Ts = Ts[.!(Ts .<: IGNORE_UNION)]
@testset "$T" for T in Ts
for dim in ((16,16), (10,500), (500,10), (256,512))
srcMat = MtlArray(rand(T, dim))
@testset "$T: $dim" for T in Ts, dim in ((16,16), (10,500), (500,10), (256,512))
srcMat = MtlArray(rand(T, dim))

dstMat = copytest(srcMat, false, false)
@test dstMat == srcMat
dstMat = copytest(srcMat, false, false)
@test dstMat == srcMat

dstMat = copytest(srcMat, true, false)
@test dstMat == srcMat'
dstMat = copytest(srcMat, true, false)
@test dstMat == srcMat'

dstMat = copytest(srcMat, false, true)
@test dstMat == srcMat'
dstMat = copytest(srcMat, false, true)
@test dstMat == srcMat'

dstMat = copytest(srcMat, true, true)
@test dstMat == srcMat
end
dstMat = copytest(srcMat, true, true)
@test dstMat == srcMat
end
end

0 comments on commit 3a4ceb4

Please sign in to comment.