| $.unitizerItem {unitizer} | R Documentation |
Retrieve Test Contents From Test Item
Description
Intended for use within the unitizer interactive environment, allows
user to retrieve whatever portions of tests are stored by unitizer.
Usage
## S4 method for signature 'unitizerItem'
x$name
## S4 method for signature 'unitizerItem,ANY'
x[[i, j, ..., exact = TRUE]]
Arguments
x |
a |
name |
a valid test sub-component |
i |
a valid test sub-component as a character string, or a sub-component index |
j |
missing for compatibility with generic |
... |
missing for compatibility with generic |
exact |
unused, always matches exact |
Details
Currently the following elements are available:
-
callthe call that was tested as an unevaluated call, but keep in mind that if you intend to evaluate this for a reference item the environment may not be the same so you could get different results (lswill provide more details) -
valuethe value that results from evaluating the test, note this is equivalent to using.newor.ref; note that the value is displayed usingdescwhen viewing all of.NEWor.REF -
outputthe screen output (i.e. anything produced by cat/print, or any visible evaluation output) as a character vector -
messageanything that was output tostderr, mostly this is all contained in the conditions as well, though there could be other output here, as a character vector -
conditionsaconditionListcontaining all the conditions produced during test evaluation -
abortedwhether the test call issues a restart call to the 'abort' restart, as 'stop' does.
Value
the test component requested
Examples
## From the unitizer> prompt:
.NEW <- mock_item() # .NEW is normally available at unitizer prompt
.NEW$call
.NEW$conditions
.NEW$value # equivalent to `.new`