Calls to expect_equal() fail whenever the values to be compared are numeric vectors with coincident entries having the value Inf. For example, on my machine, the following code:
library(testthat) expect_equal(c(0, Inf), c(1, Inf))
produces the error:
Error in is.character(message) : missing value where TRUE/FALSE needed
This should probably be fixed by handling Inf values explicitly in the function vector_equal_tol(), making the result consistent with a call to vector_equal(). Alternatively, mismatch_numeric() could be altered, so that it handles a diff argument containing entries which are neither TRUE nor FALSE.
expect_equal_inf_bug.txt
Calls to
expect_equal()fail whenever the values to be compared are numeric vectors with coincident entries having the valueInf. For example, on my machine, the following code:library(testthat) expect_equal(c(0, Inf), c(1, Inf))produces the error:
Error in is.character(message) : missing value where TRUE/FALSE neededThis should probably be fixed by handling
Infvalues explicitly in the functionvector_equal_tol(), making the result consistent with a call tovector_equal(). Alternatively,mismatch_numeric()could be altered, so that it handles adiffargument containing entries which are neitherTRUEnorFALSE.expect_equal_inf_bug.txt