@@ -26,7 +26,7 @@ function ntuple_closure(ctx, result, ::Val{N}, testval) where N
2626end
2727
2828@testsuite " base" AT-> begin
29- @testset " copyto!" begin
29+ @testcase " copyto!" begin
3030 x = fill (0f0 , (10 , 10 ))
3131 y = rand (Float32, (20 , 10 ))
3232 a = AT (x)
115115 end
116116 end
117117
118- @testset " vcat + hcat" begin
118+ @testcase " vcat + hcat" begin
119119 @test compare (vcat, AT, fill (0f0 , (10 , 10 )), rand (Float32, 20 , 10 ))
120120 @test compare (hcat, AT, fill (0f0 , (10 , 10 )), rand (Float32, 10 , 10 ))
121121
@@ -124,15 +124,15 @@ end
124124 @test compare ((a,b) -> cat (a, b; dims= 4 ), AT, rand (Float32, 3 , 4 ), rand (Float32, 3 , 4 ))
125125 end
126126
127- @testset " reshape" begin
127+ @testcase " reshape" begin
128128 @test compare (reshape, AT, rand (10 ), Ref ((10 ,)))
129129 @test compare (reshape, AT, rand (10 ), Ref ((10 ,1 )))
130130 @test compare (reshape, AT, rand (10 ), Ref ((1 ,10 )))
131131
132132 @test_throws Exception reshape (AT (rand (10 )), (10 ,2 ))
133133 end
134134
135- @testset " reinterpret" begin
135+ @testcase " reinterpret" begin
136136 a = rand (ComplexF32, 22 )
137137 A = AT (a)
138138 af0 = reinterpret (Float32, a)
148148 @test Array (Af0) == af0
149149 end
150150
151- AT <: AbstractGPUArray && @testset " ntuple test" begin
151+ AT <: AbstractGPUArray && @testcase " ntuple test" begin
152152 result = AT (Vector {NTuple{3, Float32}} (undef, 1 ))
153153 gpu_call (ntuple_test, result, Val (3 ))
154154 @test Array (result)[1 ] == (77 , 2 * 77 , 3 * 77 )
@@ -157,29 +157,29 @@ end
157157 @test Array (result)[1 ] == (x, 2 * x, 3 * x)
158158 end
159159
160- AT <: AbstractGPUArray && @testset " cartesian iteration" begin
160+ AT <: AbstractGPUArray && @testcase " cartesian iteration" begin
161161 Ac = rand (Float32, 32 , 32 )
162162 A = AT (Ac)
163163 result = fill! (copy (A), 0.0 )
164164 gpu_call (cartesian_iter, result, A, size (A))
165165 Array (result) == Ac
166166 end
167167
168- AT <: AbstractGPUArray && @testset " Custom kernel from Julia function" begin
168+ AT <: AbstractGPUArray && @testcase " Custom kernel from Julia function" begin
169169 x = AT (rand (Float32, 100 ))
170170 y = AT (rand (Float32, 100 ))
171171 gpu_call (clmap!, - , x, y; target= x)
172172 jy = Array (y)
173173 @test map! (- , jy, jy) ≈ Array (x)
174174 end
175175
176- @testset " map" begin
176+ @testcase " map" begin
177177 @test compare ((a, b)-> map (+ , a, b), AT, rand (Float32, 10 ), rand (Float32, 10 ))
178178 @test compare ((a, b)-> map! (- , a, b), AT, rand (Float32, 10 ), rand (Float32, 10 ))
179179 @test compare ((a, b, c, d)-> map! (* , a, b, c, d), AT, rand (Float32, 10 ), rand (Float32, 10 ), rand (Float32, 10 ), rand (Float32, 10 ))
180180 end
181181
182- @testset " repeat" begin
182+ @testcase " repeat" begin
183183 @test compare (a-> repeat (a, 5 , 6 ), AT, rand (Float32, 10 ))
184184 @test compare (a-> repeat (a, 5 ), AT, rand (Float32, 10 ))
185185 @test compare (a-> repeat (a, 5 ), AT, rand (Float32, 5 , 4 ))
@@ -189,18 +189,18 @@ end
189189 @test compare (a-> repeat (a, 4 , 0 ), AT, rand (Float32, 10 , 15 ))
190190 end
191191
192- @testset " permutedims" begin
192+ @testcase " permutedims" begin
193193 @test compare (x-> permutedims (x, [1 , 2 ]), AT, rand (4 , 4 ))
194194
195195 inds = rand (1 : 100 , 150 , 150 )
196196 @test compare (x-> permutedims (view (x, inds, :), (3 , 2 , 1 )), AT, rand (100 , 100 ))
197197 end
198198
199- @testset " circshift" begin
199+ @testcase " circshift" begin
200200 @test compare (x-> circshift (x, (0 ,1 )), AT, reshape (Vector (1 : 16 ), (4 ,4 )))
201201 end
202202
203- @testset " copy" begin
203+ @testcase " copy" begin
204204 a = AT ([1 ])
205205 b = copy (a)
206206 fill! (b, 0 )
0 commit comments