powered by
Try the example below. Have a look at the references and learn more from function documentation such as expect_that().
expect_that()
testthat.use_colours: Should the output be coloured? (Default: TRUE).
testthat.use_colours
TRUE
testthat.summary.max_reports: The maximum number of detailed test reports printed for the summary reporter (default: 10).
testthat.summary.max_reports
testthat.summary.omit_dots: Omit progress dots in the summary reporter (default: FALSE).
testthat.summary.omit_dots
FALSE
Wickham, H (2011). testthat: Get Started with Testing. The R Journal 3/1 5-10. https://journal.r-project.org/archive/2011-1/RJournal_2011-1_Wickham.pdf
http://adv-r.had.co.nz/Testing.html
Useful links:
http://testthat.r-lib.org
https://github.com/r-lib/testthat
Report bugs at https://github.com/r-lib/testthat/issues
# NOT RUN { library(testthat) a <- 9 expect_that(a, is_less_than(10)) expect_lt(a, 10) # }
Run the code above in your browser using DataLab