Print a test with its result as a message and return the message as a character string
printTestMessage(testexpression, testresult, newline = TRUE)
text description of what was tested
boolean result (of length one) of the test
if TRUE
(default) a new line character is appended
to the message shown.
the message that was shown as a character string
printTestMessage("apple == apple", 1 == 1)
#> apple == apple? TRUE
#> [1] TRUE
printTestMessage("apple == pear", 1 == 2)
#> apple == pear? FALSE
#> [1] FALSE