Skip to content

Commit b6bb6bb

Browse files
committed
Note that signal_expectation() should be exported in testthat
1 parent 12bec64 commit b6bb6bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/testthat-ui.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,7 @@ mismatch_exp <- function(msg, case) {
176176
}
177177
}
178178

179-
# From testthat
180-
expectation_broken <- function(exp) {
181-
expectation_type(exp) %in% c("failure", "mismatch", "error")
182-
}
179+
# FIXME: Should probably be exported from testthat
183180
signal_expectation <- function(exp) {
184181
withRestarts(
185182
if (expectation_broken(exp)) {
@@ -191,6 +188,9 @@ signal_expectation <- function(exp) {
191188
)
192189
invisible(exp)
193190
}
191+
expectation_broken <- function(exp) {
192+
expectation_type(exp) %in% c("failure", "mismatch", "error")
193+
}
194194

195195
#' Add a vdiffr dependency
196196
#'

0 commit comments

Comments
 (0)