Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / library / assertthat / tests / test-base.R @ 2486

History | View | Annotate | Download (404 Bytes)

1
context("Base assertions")
2

    
3
test_that("any message is useful", {
4
  expect_equal(validate_that(any(TRUE, FALSE)), TRUE)
5
  
6
  x <- c(FALSE, FALSE)
7
  expect_equal(validate_that(any(x)), "No elements of x are true")
8
})
9

    
10
test_that("all message is useful", {
11
  expect_equal(validate_that(all(TRUE, TRUE)), TRUE)
12
  
13
  x <- c(FALSE, TRUE)
14
  expect_match(validate_that(all(x)), "Elements .* of x are not true")
15
})