Skip to content

Commit

Permalink
correct tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Datseris committed Jul 27, 2018
1 parent 0ccac1e commit 25d25cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion test/float_length_tests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using Test
using MotifSequenceGenerator

struct FloatShout
shout::String
dur::Float64
Expand Down Expand Up @@ -33,6 +36,7 @@ end
end

using MotifSequenceGenerator: DeadEndMotifs
@test_throws DeadEndMotifs random_sequence(shouts, q, shoutlimits, shouttranslate, 0.0)
@test_throws ArgumentError random_sequence(shouts, q, shoutlimits, shouttranslate, 0.0)
@test_throws DeadEndMotifs random_sequence(shouts, q, shoutlimits, shouttranslate, 0.000001)

end
6 changes: 5 additions & 1 deletion test/integer_length_tests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using Test
using MotifSequenceGenerator

struct Shout
shout::String
start::Int
Expand All @@ -24,7 +27,8 @@ end

@testset "Integer Length δq=$(δq)" for δq in [0, 2]
for j in 1:N
r, s = random_sequence(shouts, q, shoutlimits, shouttranslate, δq)
r, s = random_sequence(shouts, q, shoutlimits, shouttranslate, δq;
tries = 10)
= shoutlens(r)
@test q - δq q + δq
end
Expand Down

0 comments on commit 25d25cb

Please sign in to comment.