tests/testthat/test-ChanceNode.R

test_that("labels are checked", {
  expect_silent(ChanceNode$new())
  expect_error(ChanceNode$new(42L), class = "non-string_label")
  expect_silent(ChanceNode$new(""))
  expect_silent(ChanceNode$new("my node"))
})

Try the rdecision package in your browser

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

rdecision documentation built on June 22, 2024, 10:02 a.m.