Skip to content

Commit 69fc1a7

Browse files
committed
add tests
1 parent 29c08f2 commit 69fc1a7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/chebyshevjacobitests.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using FastTransforms, Compat
1+
using FastTransforms, LinearAlgebra, Statistics, Compat
22
using Compat.Test
33

44
@testset "Chebyshev--Jacobi transform" begin
@@ -127,4 +127,12 @@ using Compat.Test
127127

128128
c = rand(100,100)
129129
@test maximum(abs,jjt(c,α,β,α,β)-c) < 10000eps()
130+
131+
@testset "cjt bug (#57)" begin
132+
@test cjt([1.,2],.5,.5) == [1.,3]
133+
@test FastTransforms.incrementαβ!([1.0], -0.5, -0.5) == [1.0]
134+
@test FastTransforms.incrementαβ!([1.0, 2.0], -0.5, -0.5) == [1.0,2/3]
135+
@test FastTransforms.decrementαβ!([1.0], 0.5, 0.5) == [1.0]
136+
@test FastTransforms.decrementαβ!([1.0, 2.0], 0.5, 0.5) == [1.0,6]
137+
end
130138
end

0 commit comments

Comments
 (0)