Skip to content

Commit 25d25cb

Browse files
committed
correct tests
1 parent 0ccac1e commit 25d25cb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

test/float_length_tests.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
using Test
2+
using MotifSequenceGenerator
3+
14
struct FloatShout
25
shout::String
36
dur::Float64
@@ -33,6 +36,7 @@ end
3336
end
3437

3538
using MotifSequenceGenerator: DeadEndMotifs
36-
@test_throws DeadEndMotifs random_sequence(shouts, q, shoutlimits, shouttranslate, 0.0)
39+
@test_throws ArgumentError random_sequence(shouts, q, shoutlimits, shouttranslate, 0.0)
40+
@test_throws DeadEndMotifs random_sequence(shouts, q, shoutlimits, shouttranslate, 0.000001)
3741

3842
end

test/integer_length_tests.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
using Test
2+
using MotifSequenceGenerator
3+
14
struct Shout
25
shout::String
36
start::Int
@@ -24,7 +27,8 @@ end
2427

2528
@testset "Integer Length δq=$(δq)" for δq in [0, 2]
2629
for j in 1:N
27-
r, s = random_sequence(shouts, q, shoutlimits, shouttranslate, δq)
30+
r, s = random_sequence(shouts, q, shoutlimits, shouttranslate, δq;
31+
tries = 10)
2832
= shoutlens(r)
2933
@test q - δq q + δq
3034
end

0 commit comments

Comments
 (0)