Skip to content

Commit b81c93e

Browse files
committed
Polishing
1 parent 16c23f1 commit b81c93e

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

β€ŽR/expect-output.Rβ€Ž

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,14 @@ expect_output <- function(
3737
msg <- sprintf("%s produced output.\n%s", act$lab, encodeString(act$cap))
3838
fail(msg, info = info)
3939
}
40+
pass(act$val)
4041
} else if (is.null(regexp) || identical(act$cap, "")) {
4142
if (identical(act$cap, "")) {
4243
msg <- sprintf("%s produced no output", act$lab)
4344
fail(msg, info = info)
4445
}
46+
pass(act$val)
4547
} else {
46-
return(expect_match(
47-
act$cap,
48-
enc2native(regexp),
49-
...,
50-
info = info,
51-
label = act$lab
52-
))
48+
expect_match(act$cap, enc2native(regexp), ..., info = info, label = act$lab)
5349
}
54-
55-
pass(act$val)
5650
}

β€ŽR/expect-setequal.Rβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ expect_mapequal <- function(object, expected) {
107107
vals <- paste0(encodeString(exp_miss, quote = '"'), ", ")
108108
fail(paste0("Names absent from `expected`: ", vals))
109109
}
110+
111+
pass(act$val)
110112
} else {
111113
expect_equal(act$val[exp_nms], exp$val)
112114
}
113-
114-
invisible(act$val)
115115
}
116116

117117
check_names_ok <- function(x, label) {

β€Žtests/testthat/DELETE-MEβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
If you see me, something has gone wrong with old-school teardown

β€Žtests/testthat/DELETE-ME-2β€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
If you see me, something has gone wrong with new-school teardown

0 commit comments

Comments
Β (0)