dwww Home | Show directory contents | Find package

context("checkFormula")

test_that("checkFormula", {
  f = ~ x
  expect_succ_all(Formula, f)
  expect_fail_all(Formula, 1)

  f = y ~ x + z
  expect_true(checkFormula(f))

  f = y ~ x:z + I(a)
  expect_true(checkFormula(f))

  expect_true(checkFormula(NULL, null.ok = TRUE))
  expect_error(assertFormula(1, "formula"))
})

Generated by dwww version 1.15 on Sat May 18 12:11:50 CEST 2024.