tests/testthat/test-print.R

test_that("Print shows all candidates.", {
  dtree <- dirtree(candidates = LETTERS)
  for (l in LETTERS) {
    expect_output(
      dtree$print(),
      l
    )
  }
})

Try the elections.dtree package in your browser

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

elections.dtree documentation built on Sept. 16, 2023, 5:06 p.m.