test_that("zeros", { expect_identical(zeros(NA_integer_), NA_integer_) expect_identical(zeros(integer(0)), 0L) expect_identical(zeros(1), 0L) expect_identical(zeros(c(1, 1)), 0L) expect_identical(zeros(c(0, 0)), 2L) expect_identical(zeros(c(0, 1)), 1L) expect_identical(zeros(c(0, NA_real_)), NA_integer_) expect_identical(zeros(c(0, NA_real_), na_rm = TRUE), 1L) })