print.realtest_results_summary | R Documentation |
An example (write your own which will better suit your needs)
way to summarise the results returned by test_dir
.
## S3 method for class 'realtest_results_summary'
print(x, label_fail = "fail", ...)
## S3 method for class 'realtest_results'
summary(object, label_pass = "pass", label_fail = "fail", ...)
x |
object returned by |
label_fail |
single string labelling failed test cases |
... |
currently ignored |
object |
list of objects of class |
label_pass |
single string denoting the default name for unnamed prototypes |
print.realtest_results_summary
returns x
, invisibly.
summary.realtest_results
returns an object of class
realtest_results_summary
which is a data frame summarising
the test results, featuring the following columns:
call
– the name of the function tested,
match
– the name of the first matching prototype,
label_pass
if it is unnamed or label_fail
if
there is no match,
.file
(optional) – the name of the source file which
defined the expectation,
.line
(optional) – line number,
.expr
(optional) – source code of the whole tested expression.
The official online manual of realtest at https://realtest.gagolewski.com/
Related functions:
test_dir
# r <- test_dir("~/R/realtest/inst/realtest") # some path
# s <- summary(r) # summary.realtest_results
# print(s) # print.realtest_results_summary
# stopifnot(!any(s[["match"]]=="fail")) # halt if there are failed tests
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.