View source: R/test.data.table.R
test.data.table | R Documentation |
Runs a set of tests to check data.table is working correctly.
test.data.table(script = "tests.Rraw", verbose = FALSE, pkg = ".",
silent = FALSE,
showProgress = interactive() && !silent,
testPattern = NULL,
memtest = Sys.getenv("TEST_DATA_TABLE_MEMTEST", 0),
memtest.id = NULL)
script |
Run arbitrary R test script. |
verbose |
|
pkg |
Root directory name under which all package content (ex: DESCRIPTION, src/, R/, inst/ etc..) resides. Used only in dev-mode. |
silent |
Controls what happens if a test fails. Like |
showProgress |
Output 'Running test <n> ...\r' at the start of each test? |
testPattern |
When present, a regular expression tested against the number of each test for inclusion. Useful for running only a small portion of a large test script. |
memtest |
Measure and report memory usage of tests (1:gc before ps, 2:gc after ps) rather than time taken (0) by default. Intended for and tested on Linux. See PR #5515 for more details. |
memtest.id |
An id for which to print memory usage for every sub id. May be a range of ids. |
Runs a series of tests. These can be used to see features and examples of usage, too. Running test.data.table will tell you the full location of the test file(s) to open.
Setting silent=TRUE
sets showProgress=FALSE
too, via the default of showProgress
.
If all tests were successful, TRUE
is returned. Otherwise, see the silent
argument above. silent=TRUE
is intended for use at the start of production scripts; e.g. stopifnot(test.data.table(silent=TRUE))
to check data.table
is passing its own tests before proceeding.
data.table
, test
## Not run:
test.data.table()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.