Skip to content

Commit 315be42

Browse files
committed
Update vignette
1 parent 7539980 commit 315be42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vignettes/custom-expectation.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ expect_length <- function(object, n) {
3333
act_n <- length(act$val)
3434
if (act_n != n) {
3535
msg <- sprintf("%s has length %i, not length %i.", act$lab, act_n, n)
36-
fail(msg)
36+
return(fail(msg))
3737
}
3838
3939
# 3. Pass
@@ -59,13 +59,13 @@ expect_vector_length <- function(object, n) {
5959
6060
if (!is.atomic(act$val) || !is.list(act$val)) {
6161
msg <- sprintf("%s is a %s, not a vector", act$lab, typeof(act$val))
62-
fail(msg)
62+
return(fail(msg))
6363
}
6464
6565
act_n <- length(act$val)
6666
if (act$n != n) {
6767
msg <- sprintf("%s has length %i, not length %i.", act$lab, act_n, n)
68-
fail(msg)
68+
return(fail(msg))
6969
}
7070
7171
pass(act$val)

0 commit comments

Comments
 (0)