From 03b2d0eb2e4c8c2a533b089b193f5cc3701b0b2f Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 13 Feb 2024 16:34:31 +0100 Subject: [PATCH] add test --- tests/testthat/test-data_tabulate.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/testthat/test-data_tabulate.R b/tests/testthat/test-data_tabulate.R index 3bdcc2344..aa78684e9 100644 --- a/tests/testthat/test-data_tabulate.R +++ b/tests/testthat/test-data_tabulate.R @@ -125,6 +125,12 @@ test_that("data_tabulate data.frame", { }) +test_that("data_tabulate unsupported class", { + data(mtcars) + expect_warning(data_tabulate(lm(mpg ~ hp, data = mtcars)), regex = "Can't compute frequency tables") +}) + + test_that("data_tabulate print", { set.seed(123) x <- sample.int(3, 1e6, TRUE)