Skip to content

Commit c385068

Browse files
committed
Move docs to pass/fail
1 parent 824350a commit c385068

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

R/expect-that.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,16 @@ expect_that <- function(object, condition, info = NULL, label = NULL) {
4444
#' `fail()`; learn more in `vignette("custom-expectation")`.
4545
#'
4646
#' @param message a string to display.
47-
#' @inheritParams expect
47+
#' @param info Character vector continuing additional information. Included
48+
#' for backward compatibility only and new expectations should not use it.
49+
#' @param srcref Location of the failure. Should only needed to be explicitly
50+
#' supplied when you need to forward a srcref captured elsewhere.
51+
#' @param trace An optional backtrace created by [rlang::trace_back()].
52+
#' When supplied, the expectation is displayed with the backtrace.
53+
#' @param trace_env If `is.null(trace)`, this is used to automatically
54+
#' generate a traceback running from `test_code()`/`test_file()` to
55+
#' `trace_env`. You'll generally only need to set this if you're wrapping
56+
#' an expectation inside another function.
4857
#' @export
4958
#' @examples
5059
#' \dontrun{

R/expectation.R

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,7 @@
55
#'
66
#' @param ok `TRUE` or `FALSE` indicating if the expectation was successful.
77
#' @param failure_message Message to show if the expectation failed.
8-
#' @param info Character vector continuing additional information. Included
9-
#' for backward compatibility only and new expectations should not use it.
10-
#' @param srcref Location of the failure. Should only needed to be explicitly
11-
#' supplied when you need to forward a srcref captured elsewhere.
12-
#' @param trace An optional backtrace created by [rlang::trace_back()].
13-
#' When supplied, the expectation is displayed with the backtrace.
14-
#' @param trace_env If `is.null(trace)`, this is used to automatically
15-
#' generate a traceback running from `test_code()`/`test_file()` to
16-
#' `trace_env`. You'll generally only need to set this if you're wrapping
17-
#' an expectation inside another function.
8+
#' @inheritParams fail
189
#' @return An expectation object from either `succeed()` or `fail()`.
1910
#' with a `continue_test` restart.
2011
#' @seealso [exp_signal()]

0 commit comments

Comments
 (0)