You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I obtained this confusing result when trying to use the expect_error() function as follows:
> expect_error(build_report(9), "is.character(file) is not TRUE")
Error: `build_report(9)` threw an error with unexpected message.
Expected match: "is.character(file) is not TRUE"
Actual message: "is.character(file) is not TRUE"
The function I'm testing has a quick validation check that looks like this
...
stopifnot(is.character(file))
...
To make sure that it wasn't my vision playing tricks on me, I copied both expectations from the output and pasted them into identical() and sure enough the result was TRUE.
Have I gone wrong somewhere or is this a bug?
Regards.
The text was updated successfully, but these errors were encountered:
Hi,
I obtained this confusing result when trying to use the
expect_error()
function as follows:The function I'm testing has a quick validation check that looks like this
To make sure that it wasn't my vision playing tricks on me, I copied both expectations from the output and pasted them into
identical()
and sure enough the result wasTRUE
.Have I gone wrong somewhere or is this a bug?
Regards.
The text was updated successfully, but these errors were encountered: