waldo icon indicating copy to clipboard operation
waldo copied to clipboard

Better comparison for bit64 and numeric

Open mgirlich opened this issue 2 years ago • 5 comments

testthat::expect_equal(
  tibble::tibble(x = bit64::as.integer64(1)),
  tibble::tibble(x = 1)
)

produces

Error:
! tibble::tibble(x = bit64::as.integer64(1)) (`actual`) not equal to tibble::tibble(x = 1) (`expected`).

`class(actual$x)` is a character vector ('integer64')
`class(expected$x)` is absent

  `unclass(actual$x)`: 0
`unclass(expected$x)`: 1

It would be nicer if big ints could be treated like integers where possible.

mgirlich avatar Feb 01 '23 11:02 mgirlich