@@ -24,7 +24,6 @@ function testDCT1d(N=32;arrayType = Array)
24
24
25
25
x2 = adjoint (D3)* y3
26
26
@test norm (x2 - x) / norm (x) ≈ 0 atol= 0.01
27
- true
28
27
end
29
28
30
29
function testFFT1d (N= 32 ,shift= true ;arrayType = Array)
@@ -52,7 +51,6 @@ function testFFT1d(N=32,shift=true;arrayType = Array)
52
51
x2 = adjoint (D2)* y2
53
52
end
54
53
@test norm (x1 - x2) / norm (x1) ≈ 0 atol= 0.01
55
- true
56
54
end
57
55
58
56
function testFFT2d (N= 32 ,shift= true ;arrayType = Array)
@@ -84,7 +82,6 @@ function testFFT2d(N=32,shift=true;arrayType = Array)
84
82
x2 = adjoint (D2)* y2
85
83
end
86
84
@test norm (x1 - x2) / norm (x1) ≈ 0 atol= 0.01
87
- true
88
85
end
89
86
90
87
function testWeighting (N= 512 ;arrayType = Array)
@@ -103,7 +100,6 @@ function testWeighting(N=512;arrayType = Array)
103
100
y = repeat (weights,2 ) .* x2
104
101
105
102
@test norm (Array (y2) - y) / norm (y) ≈ 0 atol= 0.01
106
- true
107
103
end
108
104
109
105
function testGradOp1d (N= 512 ;arrayType = Array)
@@ -120,7 +116,6 @@ function testGradOp1d(N=512;arrayType = Array)
120
116
xr0 = transpose (G0)* y0
121
117
122
118
@test norm (xr - xr0) / norm (xr0) ≈ 0 atol= 0.001
123
- true
124
119
end
125
120
126
121
function testGradOp2d (N= 64 ;arrayType = Array)
@@ -140,7 +135,6 @@ function testGradOp2d(N=64;arrayType = Array)
140
135
xr0 = vec (xr0)
141
136
142
137
@test norm (xr - xr0) / norm (xr0) ≈ 0 atol= 0.001
143
- true
144
138
end
145
139
146
140
function testDirectionalGradOp (N= 64 ;arrayType = Array)
@@ -173,7 +167,6 @@ function testDirectionalGradOp(N=64;arrayType = Array)
173
167
end
174
168
@test norm (x1r- vec (x1r_ref)) / norm (x1r_ref) ≈ 0 atol= 0.001
175
169
@test norm (x2r- vec (x2r_ref)) / norm (x2r_ref) ≈ 0 atol= 0.001
176
- true
177
170
end
178
171
179
172
function testSampling (N= 64 ;arrayType = Array)
@@ -196,7 +189,6 @@ function testSampling(N=64;arrayType = Array)
196
189
@test norm (y - y_ref) / norm (y_ref) ≈ 0 atol= 0.000001
197
190
@test norm (x2 - x2_ref) / norm (x2_ref) ≈ 0 atol= 0.000001
198
191
@test norm (y2 - x2_ref) / norm (x2_ref) ≈ 0 atol= 0.000001
199
- true
200
192
end
201
193
202
194
function testWavelet (M= 64 ,N= 60 ;arrayType = Array)
@@ -208,7 +200,6 @@ function testWavelet(M=64,N=60;arrayType = Array)
208
200
x_reco = reshape ( adjoint (WOp)* x_wavelet, M, N)
209
201
210
202
@test norm (x_reco - x) / norm (x) ≈ 0 atol= 0.001
211
- true
212
203
end
213
204
214
205
# test FourierOperators
@@ -265,7 +256,6 @@ function testNFFT2d(N=16;arrayType = Array)
265
256
266
257
@test Complex{eltype (nodes)} === eltype (y_nfft)
267
258
@test Complex{eltype (nodes)} === eltype (y_adj_nfft)
268
- true
269
259
end
270
260
271
261
function testNFFT3d (N= 12 ;arrayType = Array)
@@ -310,7 +300,6 @@ function testNFFT3d(N=12;arrayType = Array)
310
300
y_AHA = F' * F * vec (x)
311
301
@test y_AHA_nfft_1 ≈ y_AHA_nfft_2 rtol = 1e-2
312
302
@test y_AHA ≈ y_AHA_nfft_1 rtol = 1e-2
313
- true
314
303
end
315
304
316
305
function testDiagOp (N= 32 ,K= 2 ;arrayType = Array)
@@ -374,7 +363,6 @@ function testDiagOp(N=32,K=2;arrayType = Array)
374
363
@test y2 ≈ y3 rtol = 1e-2
375
364
end
376
365
377
- true
378
366
end
379
367
380
368
function testRadonOp (N= 32 ;arrayType = Array)
@@ -392,39 +380,38 @@ function testRadonOp(N=32;arrayType = Array)
392
380
xtmp = Array (backproject (arrayType (y), angles; geometry = geom))
393
381
x2 = reshape (Array (adjoint (op) * arrayType (vec (y1))), size (xtmp)... )
394
382
@test xtmp ≈ x2 rtol = 1e-2
395
- true
396
383
end
397
384
398
385
@testset " Linear Operators" begin
399
386
@testset for arrayType in arrayTypes
400
387
@info " test DCT-II and DCT-IV Ops: $arrayType "
401
388
for N in [2 ,8 ,16 ,32 ]
402
- @test testDCT1d (N;arrayType) skip = arrayType != Array # Not implemented for GPUs
389
+ arrayType != Array || @testset testDCT1d (N;arrayType) # Not implemented for GPUs
403
390
end
404
391
@info " test FFTOp: $arrayType "
405
392
for N in [8 ,16 ,32 ]
406
- @test testFFT1d (N,false ;arrayType)
407
- @test testFFT1d (N,true ;arrayType)
408
- @test testFFT2d (N,false ;arrayType)
409
- @test testFFT2d (N,true ;arrayType)
393
+ @testset testFFT1d (N,false ;arrayType)
394
+ @testset testFFT1d (N,true ;arrayType)
395
+ @testset testFFT2d (N,false ;arrayType)
396
+ @testset testFFT2d (N,true ;arrayType)
410
397
end
411
398
@info " test WeightingOp: $arrayType "
412
- @test testWeighting (512 ;arrayType)
399
+ @testset testWeighting (512 ;arrayType)
413
400
@info " test GradientOp: $arrayType "
414
- @test testGradOp1d (512 ;arrayType)
415
- @test testGradOp2d (64 ;arrayType)
416
- @test testDirectionalGradOp (64 ;arrayType)
401
+ @testset testGradOp1d (512 ;arrayType)
402
+ @testset testGradOp2d (64 ;arrayType)
403
+ @testset testDirectionalGradOp (64 ;arrayType)
417
404
@info " test SamplingOp: $arrayType "
418
- @test testSampling (64 ;arrayType)
405
+ @testset testSampling (64 ;arrayType)
419
406
@info " test WaveletOp: $arrayType "
420
- @test testWavelet (64 ,64 ;arrayType)
421
- @test testWavelet (64 ,60 ;arrayType)
407
+ @testset testWavelet (64 ,64 ;arrayType)
408
+ @testset testWavelet (64 ,60 ;arrayType)
422
409
@info " test NFFTOp: $arrayType "
423
- @test testNFFT2d (;arrayType) skip = arrayType == JLArray # JLArray does not have a NFFTPlan
424
- @test testNFFT3d (;arrayType) skip = arrayType == JLArray # JLArray does not have a NFFTPlan
410
+ arrayType == JLArray || @testset testNFFT2d (;arrayType) # JLArray does not have a NFFTPlan
411
+ arrayType == JLArray || @testset testNFFT3d (;arrayType) # JLArray does not have a NFFTPlan
425
412
@info " test DiagOp: $arrayType "
426
- @test testDiagOp (;arrayType)
413
+ @testset testDiagOp (;arrayType)
427
414
@info " test RadonOp: $arrayType "
428
- @test testRadonOp (;arrayType) skip = arrayType == JLArray # Stackoverflow for kernelabstraction
415
+ arrayType == JLArray || @testset testRadonOp (;arrayType) # Stackoverflow for kernelabstraction
429
416
end
430
417
end
0 commit comments