tests/testthat/test-indexes.R

test_that("index helpers accept cdm_table", {
  cdm <- emptyCdmReference("mock")

  expect_no_error(expected <- expectedIndexes(cdm$person))
  expect_identical(expected, expectedIndexes(cdm, name = "person"))

  expect_no_error(existing <- existingIndexes(cdm$person))
  expect_identical(existing, existingIndexes(cdm, name = "person"))

  expect_no_error(status <- statusIndexes(cdm$person))
  expect_identical(status, statusIndexes(cdm, name = "person"))

  expect_no_error(created <- createIndexes(cdm$person))
  expect_true(created)
})

Try the omopgenerics package in your browser

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

omopgenerics documentation built on June 17, 2026, 5:07 p.m.