| unitTests {svUnit} | R Documentation |
Performs unit tests defined in this package by running
example(unitTests.svUnit). Tests are in runit*.R files located
in the '/unitTests' subdirectory or one of its subdirectories ('/inst/unitTests'
and subdirectories in package sources).
Philippe Grosjean (phgrosjean@sciviews.org)
library(svUnit)
# Make sure to clear log of errors and failures first
clearLog()
# Run all test units defined in the 'svUnit' package
(runTest(svSuite("package:svUnit"), "svUnit"))
# Tests to run with example() but not with R CMD check
# Run all test units defined in the /unitTests/VirtualClass subdir of 'svUnit'
(runTest(svSuite("package:svUnit (VirtualClass)"), "VirtualClass"))
## Not run:
# Tests to present in ?unitTests.svUnit but to never run automatically
# Run all currently loaded test cases and test suites of all loaded packages
(runTest(svSuiteList(), "AllTests"))
## End(Not run)
# Check errors at the end of the process (needed to interrupt R CMD check)
errorLog()