@@ -114,6 +114,10 @@ expect_error <- function(
114114 info = NULL ,
115115 label = NULL
116116) {
117+ check_string(regexp , allow_null = TRUE , allow_na = TRUE )
118+ check_string(class , allow_null = TRUE )
119+ check_bool(inherit )
120+
117121 if (edition_get() > = 3 ) {
118122 expect_condition_matching_(
119123 " error" ,
@@ -158,6 +162,11 @@ expect_warning <- function(
158162 info = NULL ,
159163 label = NULL
160164) {
165+ check_string(regexp , allow_null = TRUE , allow_na = TRUE )
166+ check_string(class , allow_null = TRUE )
167+ check_bool(inherit )
168+ check_bool(all )
169+
161170 if (edition_get() > = 3 ) {
162171 if (! missing(all )) {
163172 warn(" The `all` argument is deprecated" )
@@ -207,6 +216,11 @@ expect_message <- function(
207216 info = NULL ,
208217 label = NULL
209218) {
219+ check_string(regexp , allow_null = TRUE , allow_na = TRUE )
220+ check_string(class , allow_null = TRUE )
221+ check_bool(inherit )
222+ check_bool(all )
223+
210224 if (edition_get() > = 3 ) {
211225 expect_condition_matching_(
212226 " message" ,
@@ -239,6 +253,10 @@ expect_condition <- function(
239253 info = NULL ,
240254 label = NULL
241255) {
256+ check_string(regexp , allow_null = TRUE , allow_na = TRUE )
257+ check_string(class , allow_null = TRUE )
258+ check_bool(inherit )
259+
242260 if (edition_get() > = 3 ) {
243261 expect_condition_matching_(
244262 " condition" ,
0 commit comments