Skip to content

Commit

Permalink
fix test, NAMESPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob-r committed Jun 26, 2017
1 parent e94c9ee commit a3d2c6a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ export(isSpecialValue)
export(isVector)
export(isVectorTypeString)
export(makeCharacterLearnerParam)
export(makeCharacterLearnerVectorParam)
export(makeCharacterParam)
export(makeCharacterVectorLearnerParam)
export(makeCharacterVectorParam)
export(makeDiscreteLearnerParam)
export(makeDiscreteParam)
Expand Down
4 changes: 2 additions & 2 deletions man/LearnerParam.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions tests/testthat/test_LearnerParam.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test_that("disc vec", {

test_that("function", {
p = makeFunctionLearnerParam("f1")
expect_equal(p$id, "x")
expect_equal(p$id, "f1")
expect_true(!isFeasible(p, "a"))
expect_true(isFeasible(p, identity))
expect_true(isFeasible(p, function(x) x^2))
Expand All @@ -84,16 +84,17 @@ test_that("function", {
test_that("character", {
p = makeCharacterLearnerParam("c")
expect_equal(p$id, "c")
expect_true(isFeasible(p, "a"))
expect_true(!isFeasible(p, "ab"))
expect_true(isFeasible(p, "ab"))
expect_true(!isFeasible(p, c("a","b")))
expect_true(!isFeasible(p, 1))
})

test_that("character vec", {
p = makeCharacterVectorLearnerParam("cv")
expect_equal(p$id, "cv")
expect_true(isFeasible(p, "a"))
expect_true(isFeasible(p, c("a","b")))
expect_true(!isFeasible(p, "ab"))
expect_true(isFeasible(p, c("a","b","a")))
expect_true(!isFeasible(p, 1:3))
})

test_that("untyped", {
Expand Down

0 comments on commit a3d2c6a

Please sign in to comment.