library(testit)
assert("T is bad for TRUE, and so is F for FALSE", {
T = FALSE
F = TRUE
(T != TRUE) # note the parentheses
(F != FALSE)
})
assert("A Poisson random number is non-negative", {
x = rpois(1, 10)
(x >= 0)
(x > -1) # () is optional because it's the last expression
})
Run the code above in your browser using DataLab