testthat icon indicating copy to clipboard operation
testthat copied to clipboard

expect_identical do no destinguish NA from NaN

Open sorhawell opened this issue 3 years ago • 0 comments

Hello wonderful people.

I was wondering if code example below is the intended behavior of testthat::expect_identical()

I'm running testthat 3.1.4 on macOS

  #yields failure
  expect_true(identical(NA_real_,NaN))
  
  #yields to my surprise a success
  expect_identical(NA_real_,NaN)

sorhawell avatar Aug 19 '22 09:08 sorhawell