Skip to content

Commit 47fc06f

Browse files
committed
add more tests after branch point in F64
1 parent a12f2a9 commit 47fc06f

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

test/besseli_test.jl

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,65 @@
11
# general array for testing input to SpecialFunctions.jl
2-
x = 1e-6:0.01:50.0
3-
2+
x32 = 1e-6:0.01:50.0
3+
x64 = 1e-6:0.01:600.0
44
### Tests for besseli0
5-
i0_SpecialFunctions = SpecialFunctions.besseli.(0, x)
5+
i032_SpecialFunctions = SpecialFunctions.besseli.(0, x32)
6+
i064_SpecialFunctions = SpecialFunctions.besseli.(0, x64)
7+
68

7-
i0_64 = besseli0.(Float64.(x))
8-
i0_32 = besseli0.(Float32.(x))
9+
i0_64 = besseli0.(Float64.(x64))
10+
i0_32 = besseli0.(Float32.(x32))
911

1012
# make sure output types match input types
1113
@test i0_64[1] isa Float64
1214
@test i0_32[1] isa Float32
1315

1416
# test against SpecialFunctions.jl
15-
@test i0_64 i0_SpecialFunctions
16-
@test i0_32 i0_SpecialFunctions
17+
@test i0_64 i064_SpecialFunctions
18+
@test i0_32 i032_SpecialFunctions
1719

1820
### Tests for besseli0x
19-
i0x_SpecialFunctions = SpecialFunctions.besselix.(0, x)
21+
i0x32_SpecialFunctions = SpecialFunctions.besselix.(0, x32)
22+
i0x64_SpecialFunctions = SpecialFunctions.besselix.(0, x64)
2023

21-
i0x_64 = besseli0x.(Float64.(x))
22-
i0x_32 = besseli0x.(Float32.(x))
24+
i0x_64 = besseli0x.(Float64.(x64))
25+
i0x_32 = besseli0x.(Float32.(x32))
2326

2427
# make sure output types match input types
2528
@test i0x_64[1] isa Float64
2629
@test i0x_32[1] isa Float32
2730

2831
# test against SpecialFunctions.jl
29-
@test i0x_64 i0x_SpecialFunctions
30-
@test i0x_32 i0x_SpecialFunctions
32+
@test i0x_64 i0x64_SpecialFunctions
33+
@test i0x_32 i0x32_SpecialFunctions
3134

3235

3336
### Tests for besseli1
34-
i1_SpecialFunctions = SpecialFunctions.besseli.(1, x)
37+
i132_SpecialFunctions = SpecialFunctions.besseli.(1, x32)
38+
i164_SpecialFunctions = SpecialFunctions.besseli.(1, x64)
39+
3540

36-
i1_64 = besseli1.(Float64.(x))
37-
i1_32 = besseli1.(Float32.(x))
41+
i1_64 = besseli1.(Float64.(x64))
42+
i1_32 = besseli1.(Float32.(x32))
3843

3944
# make sure output types match input types
4045
@test i1_64[1] isa Float64
4146
@test i1_32[1] isa Float32
4247

4348
# test against SpecialFunctions.jl
44-
@test i1_64 i1_SpecialFunctions
45-
@test i1_32 i1_SpecialFunctions
49+
@test i1_64 i164_SpecialFunctions
50+
@test i1_32 i132_SpecialFunctions
4651

4752
### Tests for besseli1x
48-
i1x_SpecialFunctions = SpecialFunctions.besselix.(1, x)
53+
i1x32_SpecialFunctions = SpecialFunctions.besselix.(1, x32)
54+
i1x64_SpecialFunctions = SpecialFunctions.besselix.(1, x64)
4955

50-
i1x_64 = besseli1x.(Float64.(x))
51-
i1x_32 = besseli1x.(Float32.(x))
56+
i1x_64 = besseli1x.(Float64.(x64))
57+
i1x_32 = besseli1x.(Float32.(x32))
5258

5359
# make sure output types match input types
5460
@test i1x_64[1] isa Float64
5561
@test i1x_32[1] isa Float32
5662

5763
# test against SpecialFunctions.jl
58-
@test i1x_64 i1x_SpecialFunctions
59-
@test i1x_32 i1x_SpecialFunctions
64+
@test i1x_64 i1x64_SpecialFunctions
65+
@test i1x_32 i1x32_SpecialFunctions

0 commit comments

Comments
 (0)