Further simplification and more tests for req()

This commit is contained in:
Joe Cheng
2015-12-17 11:29:54 -08:00
parent f57626d256
commit 3450a037a9
2 changed files with 5 additions and 2 deletions

View File

@@ -111,6 +111,10 @@ test_that("req works", {
value <- 0
req2(value <- value + 1)
expect_equal(value, 1)
# Lots of args are supported
expect_error(do.call(req, c(as.list(1:1000), list(NULL))))
expect_equal(1, do.call(req, as.list(1:1000)))
})
test_that("anyUnnamed works as expected", {