Skip to content

Commit

Permalink
fix issue in test for real valued mutatos
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobbossek committed Dec 7, 2015
1 parent c1dd4cb commit a9355d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test_mutators.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ test_that("mutation operators working on real-numbered representation create val
for (mutatorGenerator in available.mutators) {
mutate = mutatorGenerator()
test.seq = runif(5L)
task = list(par.set = makeNumericParamSet("x", len = 5L, lower = 0, upper = 10))
task = list(par.set = makeNumericParamSet("x", len = 5L, lower = 0, upper = 1))
for (i in seq(n.reps)) {
mut.seq = mutate(test.seq, task, control = NUL)
mut.seq = mutate(test.seq, task, control = NULL)
expect_true(all(mut.seq >= 0 && mut.seq <= 1), info = sprintf("Mutator '%s' did not stick to the
box constraints! Input: (%s), Output: (%s)", getOperatorName(mutate), collapse(test.seq), collapse(mut.seq)))
}
Expand Down

0 comments on commit a9355d8

Please sign in to comment.