Concise TAP-compliant unit testing package.
Authored unit tests can be run using
R CMD check with minimal implementation overhead.
If you want more features there are other unit testing packages (see 'See Also').
unittest package provides two functions,
ok function prints
ok when the expression provided evaluates to
not ok if the expression evaluates to anything else or results in a runtime error;
this is the
TAP format (http://testanything.org/) for reporting test results.
ok_group function is a convenience function for grouping related unit tests
TAP compliant comments in the output to separate the unit test groups.
A unit test summary is produced at the end of a session when a set of unit tests are run in non-interactive
mode, for example when the unit tests are run using
Rscript or by
R CMD check. For
R CMD check, see ‘I'm writing a package, how do I put tests in it?’.
For a list of all documentation use
Good places to start are the ‘Getting Started’
You can see these by typing
vignette('getting_started', package='unittest') and
vignette('faq', package='unittest') respectively.
Inspired by Perl's Test::Simple (http://search.cpan.org/perldoc?Test::Simple).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.