TestCaseResult | R Documentation |
Represents the results of running a test case against a global environment. Contains metadata about the passing/failing of the test case as well as a reference to the test case itself.
passed
Whether the test passed
error
An error raised by executing the test, if any
test_case
The TestCase that this result tracks
new()
Create a test case result.
TestCaseResult$new(passed, error, test_case)
passed
Whether the test passed
error
An error raised by executing the test, if any
test_case
The TestCase
that this result tracks
get_score()
Get the score earned for this test case, accounting for whether the test passed or failed.
TestCaseResult$get_score()
The score
repr()
Convert this result into a human-readable string for display.
TestCaseResult$repr()
The string representation of this result
to_list()
Convert this result to a JSON-compatible list with all of its fields.
TestCaseResult$to_list()
The list representation of this result
get_message()
Get the message to be displayed to the student based on whether the test case passed or failed, if any.
TestCaseResult$get_message()
The message or NA
clone()
The objects of this class are cloneable with this method.
TestCaseResult$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.