tests/testthat/test-logical_or.R

# ---------------------------------------------------------------------------- #
test_that("Infix operator %||% works for NULL left operand", {
  expect_equal(NULL %||% 2, 2)
})

# ---------------------------------------------------------------------------- #
test_that("Infix operator %||% works for NULL right operand", {
  expect_equal(0 %||% NULL, 0)
})

# ---------------------------------------------------------------------------- #
test_that("Infix operator %||% works for NULL left and right operand", {
  expect_equal(NULL %||% NULL, NULL)
})

# ---------------------------------------------------------------------------- #
toniprice/jute documentation built on Jan. 11, 2023, 8:23 a.m.