@@ -180,26 +180,26 @@ test_that("combine works with NA and complex (#2203)", {
180
180
withr :: local_options(lifecycle_verbosity = " quiet" )
181
181
182
182
# NA first
183
- expected_result <- c(NA , 1 + 2i )
184
- works1 <- combine(list (NA , 1 + 2i ))
183
+ expected_result <- c(NA_complex_ , 1 + 2i )
184
+ works1 <- combine(list (NA_complex_ , 1 + 2i ))
185
185
expect_equal(works1 , expected_result )
186
186
187
187
# NA length == 1
188
- expected_result <- c(1 + 1i , 2 + 1i , NA , 4 + 1i )
188
+ expected_result <- c(1 + 1i , 2 + 1i , NA_complex_ , 4 + 1i )
189
189
190
190
expect_equal(combine(as.list(expected_result )), expected_result )
191
191
192
- works2 <- combine(list (1 + 1i , 2 + 1i , NA , 4 + 1i ))
192
+ works2 <- combine(list (1 + 1i , 2 + 1i , NA_complex_ , 4 + 1i ))
193
193
expect_equal(works2 , expected_result )
194
194
195
195
# NA length > 1
196
- expected_result <- c(1 + 1i , 2 + 1i , NA , NA , 4 + 1i )
196
+ expected_result <- c(1 + 1i , 2 + 1i , NA_complex_ , NA_complex_ , 4 + 1i )
197
197
expect_equal(
198
198
combine(split(expected_result , c(1 , 2 , 3 , 3 , 4 ))),
199
199
expected_result
200
200
)
201
201
202
- works3 <- combine(list (1 + 1i , 2 + 1i , c(NA , NA ), 4 + 1i ))
202
+ works3 <- combine(list (1 + 1i , 2 + 1i , c(NA_complex_ , NA_complex_ ), 4 + 1i ))
203
203
expect_equal(works3 , expected_result )
204
204
})
205
205
0 commit comments