Skip to content

Commit acf9bf8

Browse files
committed
Add tests for NaN input for (i)aaft
1 parent 0dd0bc2 commit acf9bf8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ using TimeseriesSurrogates
33
ENV["GKSwstype"] = "100"
44

55
ts = cumsum(randn(1000))
6+
ts_nan =cumsum(randn(100))
7+
ts_nan[1] = NaN
68

79
@testset "Constrained surrogates" begin
810
@testset "Random shuffle" begin
@@ -29,6 +31,7 @@ ts = cumsum(randn(1000))
2931
@test length(ts) == length(surrogate)
3032
#@test all(ts .!= surrogate)
3133
@test all(sort(ts) .== sort(surrogate))
34+
@test_throws DomainError aaft(ts_nan)
3235
end
3336

3437
@testset "IAAFT" begin
@@ -44,6 +47,7 @@ ts = cumsum(randn(1000))
4447
@test length(ts) == length(surrogates[1])
4548
#@test all(ts .!= surrogates[end])
4649
@test all(sort(ts) .== sort(surrogates[end]))
50+
@test_throws DomainError iaaft(ts_nan)
4751
end
4852

4953
@testset "WIAAFT" begin

0 commit comments

Comments
 (0)