tests/testthat/test-guide-region-annotation.R

test_that("guide-region annotations describe their operator and common family", {
  descriptor <- getFromNamespace(".np_plot_variability_descriptor", "np")
  for (method in c("asymptotic", "bootstrap"))
    for (band in c("pointwise", "simultaneous"))
      for (shared in c(FALSE, TRUE)) {
        z <- descriptor(method, band, .05, "bias-corrected", shared=shared,
                        construction="guide-region")$candidates
        expect_true(all(grepl("guide", z, fixed=TRUE)))
        expect_true(all(grepl("residual", z, fixed=TRUE)))
        expect_false(any(grepl("SE|within panel|within each panel|normal quantile|rank-based", z)))
        expect_identical(all(grepl("supplied (finite )?family", z)),
                         identical(band, "simultaneous"))
      }
})

Try the np package in your browser

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

np documentation built on Nov. 25, 2026, 1:06 a.m.