Skip to content

Commit

Permalink
added some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mllg committed May 8, 2015
1 parent 3504a07 commit 57d8f83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test_anyMissing.r
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ test_that("allMissing", {
expect_false(allMissing(xm))
expect_false(allMissing(xf))

xb[] = xi[] = xd[] = xc[] = xm[] = xs = NA
xl = list(NULL, NULL)
xf$a = xf$b = NA

expect_true(allMissing(xb))
expect_true(allMissing(xi))
expect_true(allMissing(xd))
expect_true(allMissing(xc))
expect_true(allMissing(xs))
expect_true(allMissing(xl))
expect_true(allMissing(xm))
expect_true(allMissing(xf))

expect_false(allMissing(as.raw(1)))
expect_false(allMissing(NULL))
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test_checkInteger.r
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test_that("checkInteger", {
expect_false(testInteger(1:3, any.missing = FALSE, len = 5))
expect_true(testInteger(1:3, lower = 1L, upper = 3L))
expect_false(testInteger(1:3, lower = 5))
expect_false(testInteger(1:3, upper = 1))

expect_error(assertInteger(1), "integer")
})

0 comments on commit 57d8f83

Please sign in to comment.