Skip to content

Commit 13c0287

Browse files
committed
Support array types with more typevars.
1 parent 764e568 commit 13c0287

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/testsuite/io.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function test_io(AT)
88

99
show(io, MIME("text/plain"), A)
1010
seekstart(io)
11-
@test String(take!(io)) == "1-element $AT{Int64,1}:\n 1"
11+
@test occursin(Regex("^1-element $AT{Int64,1.*}:\n 1\$"), String(take!(io)))
1212

1313
show(io, A)
1414
seekstart(io)
@@ -19,7 +19,7 @@ function test_io(AT)
1919

2020
show(io, MIME("text/plain"), B)
2121
seekstart(io)
22-
@test String(take!(io)) == "2×2 $AT{Int64,2}:\n 1 2\n 3 4"
22+
@test occursin(Regex("^2×2 $AT{Int64,2.*}:\n 1 2\n 3 4\$"), String(take!(io)))
2323

2424
show(io, B)
2525
seekstart(io)
@@ -29,8 +29,8 @@ function test_io(AT)
2929
show(io, MIME("text/plain"), A')
3030
seekstart(io)
3131
msg = String(take!(io)) # the printing of Adjoint depends on global state
32-
@test msg == "1×1 Adjoint{Int64,$AT{Int64,1}}:\n 1" ||
33-
msg == "1×1 LinearAlgebra.Adjoint{Int64,$AT{Int64,1}}:\n 1"
32+
@test occursin(Regex("^1×1 Adjoint{Int64,$AT{Int64,1.*}}:\n 1\$"), msg) ||
33+
occursin(Regex("^1×1 LinearAlgebra.Adjoint{Int64,$AT{Int64,1.*}}:\n 1\$"), msg)
3434
end
3535
end
3636
end

src/testsuite/mapreduce.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function test_mapreduce(AT)
4545
@testset "any all ==" begin
4646
for Ac in ([false, false], [false, true], [true, true])
4747
A = AT(Ac)
48-
@test typeof(A) == AT{Bool,1}
48+
@test A isa AT{Bool,1}
4949
@test any(A) == any(Ac)
5050
@test all(A) == all(Ac)
5151
@test A == copy(A)

0 commit comments

Comments
 (0)