testwhat (version 4.2.2)

test_or: Test if one of many test sets pass.

Description

Test if one of many test sets pass.

Usage

test_or(..., incorrect_msg = NULL, choose_feedback = 1)
check_or(..., incorrect_msg = NULL, choose_feedback = 1)

Arguments

...
a set of tests, each set separated by a comma. Only one of these tests should pass
incorrect_msg
chracter string to override message generated by the failing test block.
choose_feedback
if all tests fail, selects the feedback of the set of tests that should be shown

Examples

Run this code
## Not run: 
# # Example solution code:
# # a <- 3; b <- 4
# 
# # Example SCT
# test_or(test_object('a'), test_object('b'))
# 
# # Following submissions will all be accepted:
# a <- 3; b <- 4
# a <- 3
# b <- 4
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace