View source: R/mutator-return.R
| replace_return_value | R Documentation |
Replaces the argument of every return(expr) with a fixed value (default
"NULL"). Tests that only check that a function returns something without
asserting the value will not kill these mutants.
replace_return_value(replacement = "NULL")
replacement |
Raw R source text to substitute as the return value.
Defaults to |
Only explicit return() calls are targeted. Implicit returns (the last
expression of a function body) are not affected.
A Mutator object.
replace_return_value()
replace_return_value("NA")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.