Skip to content

Commit

Permalink
Merge pull request #77 from OxfordIHTM/dev
Browse files Browse the repository at this point in the history
add tests for utility functions
  • Loading branch information
ernestguevarra authored Jun 27, 2024
2 parents 53263f3 + 80d41c7 commit 8087633
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,37 @@ testthat::test_that(
)
)

testthat::test_that(
"get_age_values warns appropriately",
testthat::expect_warning(
get_age_values(age[5], age_type[5])
)
)

testthat::test_that(
"get_age_values warns appropriately",
testthat::expect_warning(
get_age_values(age[3], age_type[3])
)
)

testthat::test_that(
"get_age_values warns appropriately",
testthat::expect_warning(
get_age_values(age[2], age_type[2])
)
)

testthat::test_that(
"get_score_combo outputs appropriate results",
testthat::expect_s3_class(
get_score_combo(
scores = c(1, 2, 3, 4, 5),
labels = c("A", "B", "C", "D", "E")
),
"tbl"
)
)

testthat::test_that(
"list_ill_defined_icd11 outputs appropriate results",
Expand Down

0 comments on commit 8087633

Please sign in to comment.