I'm trying to group my assertion with the functions makeAssertCollection and reportAssertions.
Only, I realized that for some values, the function reportAssertions adds unwanted warnings.
Here is a simple example with two functions that are doing the same job : testing if x is an int
Error in f1(Inf) :
Assertion on 'x' failed: Must be of type 'single integerish value', not 'double'.
f2(x = Inf)
Error in f2(Inf) : 1 assertions failed:
* Variable 'x': Must be of type 'single integerish value', not 'double'.
In addition: Warning message:
In setNames(as.integer(round(x, 0L)), names(x)) :
NAs introduced by coercion to integer range
Is it possible to suppress these warnings (which are not related to the evaluation of the assertion for the variable x)?
I'm trying to group my assertion with the functions
makeAssertCollection
andreportAssertions
. Only, I realized that for some values, the functionreportAssertions
adds unwanted warnings.Here is a simple example with two functions that are doing the same job : testing if
x
is an intWith
x = Inf
:Is it possible to suppress these warnings (which are not related to the evaluation of the assertion for the variable
x
)?