|
1 | 1 | module ApproxFunOrthogonalPolynomials_Runtests |
2 | 2 |
|
3 | 3 | using ApproxFunOrthogonalPolynomials |
4 | | -using ApproxFunOrthogonalPolynomials: isapproxminhalf, isequalminhalf, isequalhalf, isapproxhalfoddinteger |
5 | | -using LinearAlgebra |
6 | | -using Test |
7 | | -using Aqua |
8 | | -using Static |
9 | | -using HalfIntegers |
10 | | -using OddEvenIntegers |
11 | | - |
12 | | -@testset "Project quality" begin |
13 | | - Aqua.test_all(ApproxFunOrthogonalPolynomials, ambiguities=false, piracies = false) |
14 | | -end |
15 | | - |
16 | | -@testset "Domain" begin |
17 | | - @test reverseorientation(Arc(1,2,(0.1,0.2))) == Arc(1,2,(0.2,0.1)) |
| 4 | +using ParallelTestRunner |
| 5 | + |
| 6 | +const init_code = quote |
| 7 | + using ApproxFunOrthogonalPolynomials |
| 8 | + using ApproxFunOrthogonalPolynomials: isapproxminhalf, isequalminhalf, isequalhalf, isapproxhalfoddinteger |
| 9 | + using LinearAlgebra |
| 10 | + using Test |
| 11 | + using Static |
| 12 | + using HalfIntegers |
| 13 | + using OddEvenIntegers |
| 14 | + using Test |
| 15 | + include("testutils.jl") |
18 | 16 | end |
19 | 17 |
|
20 | | -# missing import bug |
21 | | -@test ApproxFunOrthogonalPolynomials.Matrix === Base.Matrix |
| 18 | +# Start with autodiscovered tests |
| 19 | +testsuite = find_tests(pwd()) |
22 | 20 |
|
23 | | -include("testutils.jl") |
| 21 | +# Parse arguments |
| 22 | +args = parse_args(ARGS) |
24 | 23 |
|
25 | | -@testset "helpers" begin |
26 | | - for f in [isequalminhalf, isapproxminhalf] |
27 | | - @test f(-0.5) |
28 | | - @test f(static(-0.5)) |
29 | | - @test f(half(Odd(-1))) |
30 | | - @test !f(-0.2) |
31 | | - @test !f(half(Odd(1))) |
32 | | - @test !f(1) |
33 | | - @test !f(static(1)) |
| 24 | +if filter_tests!(testsuite, args) |
| 25 | + # There are weird non-deterministic `ReadOnlyMemoryError`s on Windows, |
| 26 | + # so this test is disabled for now |
| 27 | + delete!(testsuite, "testutils.jl") |
| 28 | + if Sys.iswindows() |
| 29 | + delete!(testsuite, "UltrasphericalTest.jl") |
34 | 30 | end |
35 | | - @test !isequalhalf(-0.5) |
36 | | - @test !isequalhalf(static(-0.5)) |
37 | | - @test !isequalhalf(half(Odd(-1))) |
38 | | - @test !isequalhalf(-0.2) |
39 | | - @test isequalhalf(0.5) |
40 | | - @test isequalhalf(static(0.5)) |
41 | | - @test isequalhalf(half(Odd(1))) |
42 | | - @test !isequalhalf(1) |
43 | | - @test !isequalhalf(static(1)) |
44 | | - |
45 | | - @test isapproxhalfoddinteger(0.5) |
46 | | - @test isapproxhalfoddinteger(static(0.5)) |
47 | | - @test isapproxhalfoddinteger(half(Odd(1))) |
48 | | - @test !isapproxhalfoddinteger(1) |
49 | | - @test !isapproxhalfoddinteger(static(1)) |
50 | | - |
51 | | - @test ApproxFunOrthogonalPolynomials._minonehalf(2) == -0.5 |
52 | | - @test ApproxFunOrthogonalPolynomials._onehalf(2) == 0.5 |
53 | | -end |
54 | | - |
55 | | -include("ClenshawTest.jl"); GC.gc() |
56 | | -include("MiscAFBTest.jl"); GC.gc() |
57 | | -include("ChebyshevTest.jl"); GC.gc() |
58 | | -# There are weird non-deterministic `ReadOnlyMemoryError`s on Windows, |
59 | | -# so this test is disabled for now |
60 | | -if !Sys.iswindows() |
61 | | - include("UltrasphericalTest.jl"); GC.gc() |
62 | 31 | end |
63 | | -include("JacobiTest.jl"); GC.gc() |
64 | | -include("LaguerreTest.jl"); GC.gc() |
65 | | -include("HermiteTest.jl"); GC.gc() |
66 | | -include("SpacesTest.jl"); GC.gc() |
67 | | -include("ComplexTest.jl"); GC.gc() |
68 | | -include("broadcastingtest.jl"); GC.gc() |
69 | | -include("OperatorTest.jl"); GC.gc() |
70 | | -include("ODETest.jl"); GC.gc() |
71 | | -include("EigTest.jl"); GC.gc() |
72 | | -include("VectorTest.jl"); GC.gc() |
73 | | -include("MultivariateTest.jl"); GC.gc() |
74 | | -include("PDETest.jl"); GC.gc() |
75 | 32 |
|
76 | | -include("SpeedTest.jl"); GC.gc() |
77 | | -include("SpeedODETest.jl"); GC.gc() |
78 | | -include("SpeedPDETest.jl"); GC.gc() |
79 | | -include("SpeedOperatorTest.jl"); GC.gc() |
80 | | -include("showtest.jl"); GC.gc() |
| 33 | +runtests(ApproxFunOrthogonalPolynomials, args; init_code, testsuite) |
81 | 34 |
|
82 | 35 | end # module |
0 commit comments