From 2f3e96bcff6fa0264f98910f81924f1a2ef944f7 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Tue, 29 Oct 2024 15:24:20 -0500 Subject: [PATCH] Include more docs in index Fixes #1941. Fixes #1922. --- R/edition.R | 1 - R/expect-constant.R | 2 -- R/expect-self-test.R | 2 -- R/expectation.R | 1 - R/expectations-matches.R | 1 - R/test-files.R | 1 - _pkgdown.yml | 5 +++++ man/expect_match.Rd | 1 - man/expect_null.Rd | 1 - man/expect_success.Rd | 1 - man/expectation.Rd | 1 - man/local_edition.Rd | 1 - man/test_dir.Rd | 1 - 13 files changed, 5 insertions(+), 14 deletions(-) diff --git a/R/edition.R b/R/edition.R index 438e1e2fc..333f53322 100644 --- a/R/edition.R +++ b/R/edition.R @@ -60,7 +60,6 @@ edition_name <- function(x) { #' @export #' @param x Edition Should be a single integer. #' @param .env Environment that controls scope of changes. For expert use only. -#' @keywords internal local_edition <- function(x, .env = parent.frame()) { stopifnot(is_zap(x) || (is.numeric(x) && length(x) == 1)) diff --git a/R/expect-constant.R b/R/expect-constant.R index c297e2846..72e267e96 100644 --- a/R/expect-constant.R +++ b/R/expect-constant.R @@ -50,7 +50,6 @@ expect_false <- function(object, info = NULL, label = NULL) { #' check for it either with `expect_equal(x, NULL)` or `expect_type(x, "NULL")`. #' #' @inheritParams expect_that -#' @keywords internal #' @export #' @family expectations #' @examples @@ -83,4 +82,3 @@ expect_waldo_constant <- function(act, constant, info) { invisible(act$val) } - diff --git a/R/expect-self-test.R b/R/expect-self-test.R index 4768ca00c..112018800 100644 --- a/R/expect-self-test.R +++ b/R/expect-self-test.R @@ -7,7 +7,6 @@ #' @param expr Expression that evaluates a single expectation. #' @param message Check that the failure message matches this regexp. #' @param ... Other arguments passed on to [expect_match()]. -#' @keywords internal #' @export expect_success <- function(expr) { exp <- capture_expectation(expr) @@ -114,4 +113,3 @@ local_output_override <- function(width = 80, crayon = TRUE, unicode = TRUE, reporter$unicode <- old_unicode }, .env) } - diff --git a/R/expectation.R b/R/expectation.R index c02e55134..57febc222 100644 --- a/R/expectation.R +++ b/R/expectation.R @@ -89,7 +89,6 @@ expect <- function(ok, failure_message, #' @param message Message describing test failure #' @param srcref Optional `srcref` giving location of test. #' @inheritParams expect -#' @keywords internal #' @export expectation <- function(type, message, srcref = NULL, trace = NULL) { new_expectation(type, message, srcref = srcref, trace = trace) diff --git a/R/expectations-matches.R b/R/expectations-matches.R index 0d4d1c4a9..0f4e679be 100644 --- a/R/expectations-matches.R +++ b/R/expectations-matches.R @@ -15,7 +15,6 @@ #' (not a regular expressions). Overrides `perl`. #' @inheritDotParams base::grepl -pattern -x -perl -fixed #' @family expectations -#' @keywords internal #' @export #' @examples #' expect_match("Testing is fun", "fun") diff --git a/R/test-files.R b/R/test-files.R index 397fb2dc6..db231a2d7 100644 --- a/R/test-files.R +++ b/R/test-files.R @@ -37,7 +37,6 @@ #' Config/testthat/load-all: list(export_all = FALSE, helpers = FALSE) #' ``` #' @param wrap DEPRECATED -#' @keywords internal #' @return A list (invisibly) containing data about the test results. #' @inheritParams with_reporter #' @inheritParams source_file diff --git a/_pkgdown.yml b/_pkgdown.yml index 209eea3d6..581dd8fbe 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -20,12 +20,14 @@ reference: - subtitle: Objects contents: - expect_equal + - expect_null - expect_type - subtitle: Vectors contents: - expect_length - expect_gt + - expect_match - expect_named - expect_setequal - expect_true @@ -49,6 +51,7 @@ reference: - title: Test helpers contents: + - local_edition - is_testing - skip - teardown_env @@ -73,7 +76,9 @@ reference: - title: Expectation internals contents: - expect + - expectation - fail + - expect_success news: releases: diff --git a/man/expect_match.Rd b/man/expect_match.Rd index 1272f53e3..4142ce8e8 100644 --- a/man/expect_match.Rd +++ b/man/expect_match.Rd @@ -101,4 +101,3 @@ Other expectations: \code{\link{logical-expectations}} } \concept{expectations} -\keyword{internal} diff --git a/man/expect_null.Rd b/man/expect_null.Rd index 45b1adb12..e3b953cce 100644 --- a/man/expect_null.Rd +++ b/man/expect_null.Rd @@ -44,4 +44,3 @@ Other expectations: \code{\link{logical-expectations}} } \concept{expectations} -\keyword{internal} diff --git a/man/expect_success.Rd b/man/expect_success.Rd index 294a2d6dc..e4d6304fa 100644 --- a/man/expect_success.Rd +++ b/man/expect_success.Rd @@ -24,4 +24,3 @@ Use these expectations to test other expectations. Use \code{show_failure()} in examples to print the failure message without throwing an error. } -\keyword{internal} diff --git a/man/expectation.Rd b/man/expectation.Rd index 013a15676..6788fb3cc 100644 --- a/man/expectation.Rd +++ b/man/expectation.Rd @@ -51,4 +51,3 @@ details. Create an expectation with \code{expectation()} or \code{new_expectation()} and signal it with \code{exp_signal()}. } -\keyword{internal} diff --git a/man/local_edition.Rd b/man/local_edition.Rd index f93c8456f..8c317a9b2 100644 --- a/man/local_edition.Rd +++ b/man/local_edition.Rd @@ -19,4 +19,3 @@ edition_get() a single test file) change the active edition of testthat. \code{edition_get()} allows you to retrieve the currently active edition. } -\keyword{internal} diff --git a/man/test_dir.Rd b/man/test_dir.Rd index 75a65eed1..27fdc5a3f 100644 --- a/man/test_dir.Rd +++ b/man/test_dir.Rd @@ -78,4 +78,3 @@ namespace environment, so that tests can access internal functions and objects. } -\keyword{internal}