tests/testthat/test-is-nan-infinity.R

# TODO: tests for infiniteness

test_that("test.is_not_nan.nan.returns_false", {
  expect_false(is_not_nan(NaN))
})

test_that("test.is_not_nan.not_na.returns_true", {
  expect_true(is_not_nan(1))
})

Try the assertive.numbers package in your browser

Any scripts or data that you put into this service are public.

assertive.numbers documentation built on May 2, 2019, 3:30 p.m.