tests/testthat/test-util.R

context("util")

test_that("null-or-value works", {
  expect_equal(1 %||% NULL, 1)
  expect_equal(1 %||% 2, 1)
  expect_equal(NULL %||% NULL, NULL)
  expect_equal(NULL %||% 2, 2)
})
mrc-ide/squire documentation built on Sept. 10, 2022, 1:11 a.m.