$.unitizerItem
Retrieve Test Contents From Test Item
Intended for use within the unitizer
interactive environment, allows
user to retrieve whatever portions of tests are stored by unitizer
.
Usage
# S4 method for unitizerItem
$(x, name)# S4 method for unitizerItem,ANY
[[(x, i, j, ..., exact = TRUE)
Arguments
- x
a
unitizerItem
object, typically.NEW
or.REF
at theunitizer
interactive prompt- 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:
call
the 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 (ls
will provide more details)value
the value that results from evaluating the test, note this is equivalent to using.new
or.ref
; note that the value is displayed usingdesc
when viewing all of.NEW
or.REF
output
the screen output (i.e. anything produced by cat/print, or any visible evaluation output) as a character vectormessage
anything that was output tostderr
, mostly this is all contained in the conditions as well, though there could be other output here, as a character vectorconditions
aconditionList
containing all the conditions produced during test evaluationaborted
whether the test call issues a restart call to the `abort` restart, as `stop` does.
Value
the test component requested
Examples
# NOT RUN {
## From the unitizer> prompt:
.NEW <- mock_item() # .NEW is normally available at unitizer prompt
.NEW$call
.NEW$conditions
.NEW$value # equivalent to `.new`
# }