@@ -51,30 +51,30 @@ test_that("`validate_version_bound` validate and class checks together allow and
51
51
my_version_bound1 <- `class<-`(24 , " c1" )
52
52
expect_error(
53
53
validate_version_bound(my_version_bound1 , x_int , na_ok = FALSE ),
54
- regexp = " must have the same classes as"
54
+ regexp = " must have the same `class` vector as"
55
55
)
56
56
my_version_bound2 <- `class<-`(list (12 ), c(" c2a" , " c2b" , " c2c" ))
57
- expect_error(validate_version_bound(my_version_bound2 , x_list , na_ok = FALSE ), regexp = " must have the same classes " )
57
+ expect_error(validate_version_bound(my_version_bound2 , x_list , na_ok = FALSE ), regexp = " must have the same `class` " )
58
58
# Want no error matching date to date or datetime to datetime, but no interop due to tz issues:
59
59
validate_version_bound(my_date , x_date , version_bound_arg = " vb" )
60
60
validate_version_bound(my_datetime , x_datetime , version_bound_arg = " vb" )
61
61
expect_error(
62
62
validate_version_bound(my_datetime , x_date , na_ok = TRUE , version_bound_arg = " vb" ),
63
- regexp = " must have the same classes " ,
63
+ regexp = " must have the same `class` " ,
64
64
class = " epiprocess__version_bound_mismatched_class"
65
65
)
66
66
expect_error(
67
67
validate_version_bound(my_date , x_datetime , na_ok = TRUE , version_bound_arg = " vb" ),
68
- regexp = " must have the same classes " ,
68
+ regexp = " must have the same `class` " ,
69
69
class = " epiprocess__version_bound_mismatched_class"
70
70
)
71
71
# Bad:
72
- expect_error(validate_version_bound(3.5 , x_int , TRUE , " vb" ), regexp = " must have the same classes " )
73
- expect_error(validate_version_bound(.Machine $ integer.max , x_dbl , TRUE , " vb" ), regexp = " must have the same classes " )
72
+ expect_error(validate_version_bound(3.5 , x_int , TRUE , " vb" ), regexp = " must have the same `class` " )
73
+ expect_error(validate_version_bound(.Machine $ integer.max , x_dbl , TRUE , " vb" ), regexp = " must have the same `class` " )
74
74
expect_error(validate_version_bound(
75
75
`class<-`(list (2 ), " clazz" ),
76
76
tibble :: tibble(version = `class<-`(5L , " clazz" )), TRUE , " vb"
77
- ), regexp = " must have the same type " , class = " epiprocess__version_bound_mismatched_typeof" )
77
+ ), regexp = " must have the same `typeof` " , class = " epiprocess__version_bound_mismatched_typeof" )
78
78
# Maybe questionable:
79
79
expect_error(validate_version_bound(3 , x_int , TRUE , " vb" ))
80
80
expect_error(validate_version_bound(3L , x_dbl , TRUE , " vb" ))
@@ -99,7 +99,7 @@ test_that("archive version bounds args work as intended", {
99
99
clobberable_versions_start = 1241 ,
100
100
versions_end = measurement_date
101
101
),
102
- regexp = " must have the same classes "
102
+ regexp = " must have the same `class` "
103
103
)
104
104
expect_error(
105
105
as_epi_archive(update_tbl [integer(0L ), ]),
0 commit comments