tests/testthat/test-independent-test-plot.binomialSPRT.R

testthat::test_that("plot.binomialSPRT: plots are correctly rendered", {
  plotBSPRT <- binomialSPRT(
    p0 = 0.05,
    p1 = 0.25,
    alpha = 0.1,
    beta = 0.15,
    minn = 10,
    maxn = 35
  )

  vdiffr::expect_doppelganger(
    "binomial SPRT",
    plot.binomialSPRT(plotBSPRT)
  )
})

testthat::test_that("plot.binomialSPRT: plots are correctly rendered, plottype = 1", {
  plotBSPRT <- binomialSPRT(
    p0 = 0.05,
    p1 = 0.25,
    alpha = 0.1,
    beta = 0.15,
    minn = 10,
    maxn = 35
  )

  vdiffr::expect_doppelganger(
    "binomial SPRT plottype 1",
    plot.binomialSPRT(plotBSPRT, plottype = 1)
  )
})

Try the gsDesign package in your browser

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

gsDesign documentation built on June 8, 2025, 1:49 p.m.