|
1 |
| -## Testing |
| 1 | +module ApproxFunBaseTest |
| 2 | + |
| 3 | +using ApproxFunBase |
| 4 | +using ApproxFunBase: plan_transform, plan_itransform, israggedbelow, RaggedMatrix, isbandedbelow, isbanded, |
| 5 | + blockstart, blockstop, resizedata! |
| 6 | +using BandedMatrices: rowstart, rowstop, colstart, colstop, BandedMatrix, bandwidth |
| 7 | +using BlockArrays |
| 8 | +using BlockArrays: blockrowstop, blockcolstop |
| 9 | +using BlockBandedMatrices |
| 10 | +using BlockBandedMatrices: isbandedblockbanded |
| 11 | +using DomainSets: dimension |
| 12 | +using InfiniteArrays |
| 13 | +using LinearAlgebra |
| 14 | +using Test |
| 15 | + |
2 | 16 | # These routines are for the unit tests
|
3 | 17 |
|
4 |
| -using Test |
| 18 | +export testspace, testfunctional, testraggedbelowoperator, testbandedblockbandedoperator, |
| 19 | + testbandedoperator, testtransforms, testcalculus, testmultiplication, testinfoperator, |
| 20 | + testblockbandedoperator, testbandedbelowoperator |
| 21 | + |
| 22 | +# assert type in convert |
| 23 | +strictconvert(::Type{T}, x) where {T} = convert(T, x)::T |
5 | 24 |
|
6 | 25 | ## Spaces Tests
|
7 | 26 |
|
8 | 27 |
|
9 | 28 | function testtransforms(S::Space;minpoints=1,invertibletransform=true)
|
10 | 29 | # transform tests
|
11 |
| - v = rand(max(minpoints,min(100,ApproxFunBase.dimension(S)))) |
| 30 | + v = rand(max(minpoints,min(100,dimension(S)))) |
12 | 31 | plan = plan_transform(S,v)
|
13 | 32 | @test transform(S,v) == plan*v
|
14 | 33 |
|
@@ -227,3 +246,8 @@ function testbandedblockbandedoperator(A)
|
227 | 246 |
|
228 | 247 | @test isa(A[Block.(1:4),Block.(1:4)], BandedBlockBandedMatrix)
|
229 | 248 | end
|
| 249 | + |
| 250 | +end |
| 251 | + |
| 252 | +using .ApproxFunBaseTest |
| 253 | +export ApproxFunBaseTest |
0 commit comments