Skip to content

Commit 94a654e

Browse files
committed
Move show test into allowscalar block
1 parent ce03a67 commit 94a654e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/libraries/cusparse.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ blockdim = 5
1515
@testset "array" begin
1616
x = sprand(m,0.2)
1717
d_x = CuSparseVector(x)
18-
@test sprint(show, d_x) == replace(sprint(show, x), "SparseVector{Float64, Int64}"=>"CUDA.CUSPARSE.CuSparseVector{Float64, Int32}", "sparsevec(["=>"sparsevec(Int32[")
1918
@test length(d_x) == m
2019
@test size(d_x) == (m,)
2120
@test size(d_x,1) == m
2221
@test size(d_x,2) == 1
2322
@test ndims(d_x) == 1
2423
dense_d_x = CuVector(x)
2524
CUDA.@allowscalar begin
25+
@test sprint(show, d_x) == replace(sprint(show, x), "SparseVector{Float64, Int64}"=>"CUDA.CUSPARSE.CuSparseVector{Float64, Int32}", "sparsevec(["=>"sparsevec(Int32[")
2626
@test Array(d_x[:]) == x[:]
2727
@test d_x[firstindex(d_x)] == x[firstindex(x)]
2828
@test d_x[div(end, 2)] == x[div(end, 2)]

0 commit comments

Comments
 (0)