From 584dbcf5431642f6dd663b95ee98ca17af34b32e Mon Sep 17 00:00:00 2001 From: ncullen93 Date: Thu, 16 Dec 2021 12:28:08 +0100 Subject: [PATCH] tests --- tests/testthat/test-aba_fit.R | 12 ++++++++++++ tests/testthat/test-stat_mmrm.R | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/tests/testthat/test-aba_fit.R b/tests/testthat/test-aba_fit.R index 7a68c67..f5156e5 100644 --- a/tests/testthat/test-aba_fit.R +++ b/tests/testthat/test-aba_fit.R @@ -203,6 +203,18 @@ test_that("small data after processing throws an error", { }) +test_that("verbose works", { + expect_error( + m <- adnimerge %>% + aba_model(verbose = TRUE) %>% + set_outcomes(MMSE) %>% + set_covariates(AGE) %>% + set_stats('lm') %>% + aba_fit(), + NA + ) +}) + test_that("fit with only one value for each spec param works", { # no group & no predictors - should still work diff --git a/tests/testthat/test-stat_mmrm.R b/tests/testthat/test-stat_mmrm.R index 17f3522..c5f1ea9 100644 --- a/tests/testthat/test-stat_mmrm.R +++ b/tests/testthat/test-stat_mmrm.R @@ -1,3 +1,11 @@ +test_that("print stat works", { + mmrm <- stat_mmrm(id = 'id', time = 'time', treatment = 'x') + expect_output( + print(mmrm), + NULL + ) +}) + test_that("standard mmrm works", { # fit