Skip to content

Commit

Permalink
resolved test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
realbp committed Mar 18, 2024
1 parent 8a4bc13 commit 033af3d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 34 deletions.
28 changes: 0 additions & 28 deletions man/get_area.Rd

This file was deleted.

3 changes: 1 addition & 2 deletions tests/testthat/test-handle-alcohol.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ test_that("handle_alcohol correctly maps alcohol", {
c("binge drinking (4+ drinks on one occasion for women, 5+ drinks for one occasion for men), ages 21+"),
handle_alcohol
)
expected <- c(`binge drinking (4+ drinks on one occasion for women, 5+ drinks for one occasion for men),
ages 21+` = "v505")
expected <- c(`binge drinking (4+ drinks on one occasion for women, 5+ drinks for one occasion for men), ages 21+` = "v505")

expect_equal(result, expected)
})
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-incidence-cancer.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,15 @@ test_that("incidence_cancer handles invalid cancer parameters", {
expect_error(
incidence_cancer(
"wa", "county", "all cancer sites", "black (non-hispanic)",
"both sexes", "ages 65+", "late stage (regional & distant)"
"both sexes", "ages 65+", "late stage (regional & distant)",
"latest 5 year average"
),
"For this cancer type, stage must be all stages"
)
expect_error(
incidence_cancer(
"ca", "hsa", "prostate", "all races (includes hispanic)", "both sexes",
"ages 50+", "all stages"
"ages 50+", "all stages", "latest 5 year average"
),
"For prostate cancer, sex must be males."
)
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-mortality-cancer.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,15 @@ test_that("mortality_cancer handles invalid cancer parameters", {
mortality_cancer(
area = "wa", areatype = "county", cancer = "ovary",
race = "all races (includes hispanic)",
sex = "both sexes", age = "ages 50+"
sex = "both sexes", age = "ages 50+",
year = "latest 5 year average"
),
"For this cancer type, sex must be females"
)
expect_error(
mortality_cancer(
"usa", "state", "prostate", "all races (includes hispanic)",
"both sexes", "ages 50+"
"both sexes", "ages 50+", "latest 5 year average"
),
"For prostate cancer, sex must be males."
)
Expand Down

0 comments on commit 033af3d

Please sign in to comment.