Testthat code. Tools to make testing fun :)


[Up] [Top]

Documentation for package ‘testthat’ version 0.6

Help Pages

auto_test Watches code and tests for changes, rerunning tests as appropriate.
auto_test_package Watches a package for changes, rerunning tests as appropriate.
colourise Colourise text for display in the terminal.
context Describe the context of a set of tests.
equals Expectation: is the object equal (with numerical tolerance) to a value?
expect_equal Expectation: is the object equal (with numerical tolerance) to a value?
expect_equivalent Expectation: is the object equivalent to a value? This expectation tests for equivalency: are two objects equal once their attributes have been removed.
expect_error Expectation: does expression throw an error?
expect_false Expectation: is the object false?
expect_identical Expectation: is the object identical to another?
expect_is Expectation: does the object inherit from a class?
expect_match Expectation: does string match regular expression?
expect_message Expectation: does expression show a message?
expect_output Expectation: does printed output match a regular expression?
expect_that Expect that a condition holds.
expect_true Expectation: is the object true?
expect_warning Expectation: does expression give a warning?
gives_warning Expectation: does expression give a warning?
is_a Expectation: does the object inherit from a class?
is_equivalent_to Expectation: is the object equivalent to a value? This expectation tests for equivalency: are two objects equal once their attributes have been removed.
is_false Expectation: is the object false?
is_identical_to Expectation: is the object identical to another?
is_true Expectation: is the object true?
library_if_available Load package, if available.
matches Expectation: does string match regular expression?
MinimalReporter Test reporter: minimal.
prints_text Expectation: does printed output match a regular expression?
Reporter Stub object for managing a reporter of tests.
shows_message Expectation: does expression show a message?
StopReporter Test reporter: stop on error.
SummaryReporter Test reporter: summary of errors.
takes_less_than Expectation: does expression take less than a fixed amount of time to run?
test_dir Run all of the tests in a directory.
test_file Run all tests in specified file.
test_package Run all tests in an installed package
test_that Create a test.
throws_error Expectation: does expression throw an error?
watch Watch a directory for changes (additions, deletions & modifications).