Skip to content

Commit

Permalink
Closes # 2581 enhance test coverage: derive_var_trtemfl() (#2617)
Browse files Browse the repository at this point in the history
* # 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
  • Loading branch information
jimrothstein authored Dec 23, 2024
1 parent 894ca01 commit ba940b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/derive_var_trtemfl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-derive_var_trtemfl.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
),
Expand Down

0 comments on commit ba940b3

Please sign in to comment.