Skip to content

Commit 293c298

Browse files
authored
move tests to a separate module (#235)
* move tests to separate module * export more names * fix isbanded * fix imports for AFFourier * export ApproxFunBaseTest
1 parent bb09679 commit 293c298

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.7.21"
3+
version = "0.7.22"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/ApproxFunBase.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module ApproxFunBase
2-
using Base: AnyDict
2+
using Base: AnyDict
33
using Base, BlockArrays, BandedMatrices, BlockBandedMatrices, DomainSets, IntervalSets,
44
SpecialFunctions, AbstractFFTs, FFTW, SpecialFunctions, DSP, DualNumbers,
55
LinearAlgebra, SparseArrays, LowRankApprox, FillArrays, InfiniteArrays, InfiniteLinearAlgebra #, Arpack

src/testing.jl

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
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+
216
# These routines are for the unit tests
317

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
524

625
## Spaces Tests
726

827

928
function testtransforms(S::Space;minpoints=1,invertibletransform=true)
1029
# transform tests
11-
v = rand(max(minpoints,min(100,ApproxFunBase.dimension(S))))
30+
v = rand(max(minpoints,min(100,dimension(S))))
1231
plan = plan_transform(S,v)
1332
@test transform(S,v) == plan*v
1433

@@ -227,3 +246,8 @@ function testbandedblockbandedoperator(A)
227246

228247
@test isa(A[Block.(1:4),Block.(1:4)], BandedBlockBandedMatrix)
229248
end
249+
250+
end
251+
252+
using .ApproxFunBaseTest
253+
export ApproxFunBaseTest

0 commit comments

Comments
 (0)