From ba940b3578f6fb3584e72bec618dcf1e554ff4ad Mon Sep 17 00:00:00 2001 From: jim Date: Mon, 23 Dec 2024 10:13:42 -0800 Subject: [PATCH] Closes # 2581 enhance test coverage: derive_var_trtemfl() (#2617) * # 2581 enhance test coverage: derive_var_trtemfl() - Test # 10, fix typo - Test # 11, new test to increase coverage * # 2581 coverage derive_var_trtemfl, Test #11 add * git checkout 49a2b19d1 -- admiral.Rproj; should (1) replace admiral.Rproj as it was in commit 49a2b19d1 and (2) make commit, so older history is not changed --- tests/testthat/_snaps/derive_var_trtemfl.md | 4 ++-- tests/testthat/test-derive_var_trtemfl.R | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/testthat/_snaps/derive_var_trtemfl.md b/tests/testthat/_snaps/derive_var_trtemfl.md index 0c1282965f..607f736f26 100644 --- a/tests/testthat/_snaps/derive_var_trtemfl.md +++ b/tests/testthat/_snaps/derive_var_trtemfl.md @@ -34,10 +34,10 @@ ! `intensity` argument was specified but not `initial_intensity` Either both or none of them must be specified. -# derive_var_trtemfl Test 11: error if `group_var` without `subject_keys` +# derive_var_trtemfl Test 11: error if `group_var` specified without `subject_keys` Code - derive_var_trtemfl(adae, group_var = AEGRPID, subject_keys = NULL) + derive_var_trtemfl(adae2, group_var = AEGRPID, subject_keys = NULL) Condition Error in `derive_var_trtemfl()`: ! `group_var` argument was specified but not `subject_keys` diff --git a/tests/testthat/test-derive_var_trtemfl.R b/tests/testthat/test-derive_var_trtemfl.R index a91348d630..181f9007c0 100644 --- a/tests/testthat/test-derive_var_trtemfl.R +++ b/tests/testthat/test-derive_var_trtemfl.R @@ -205,11 +205,11 @@ test_that("derive_var_trtemfl Test 10: error if `intensity` without `initial_int ) }) -## Test 11: error if `group_var` are specified without `subject_keys` ---- -test_that("derive_var_trtemfl Test 11: error if `group_var` without `subject_keys`", { +## Test 11: error if `group_var` specified without `subject_keys` ---- +test_that("derive_var_trtemfl Test 11: error if `group_var` specified without `subject_keys`", { expect_snapshot( derive_var_trtemfl( - adae, + adae2, group_var = AEGRPID, subject_keys = NULL ),