unit tests

This commit is contained in:
dr. M.S. (Matthijs) Berends 2018-08-23 01:01:50 +02:00
parent da5379c881
commit 8ab93b6688
3 changed files with 5 additions and 2 deletions

View File

@ -52,7 +52,7 @@ Imports:
xml2 (>= 1.0.0),
knitr (>= 1.0.0),
readr,
rlang,
rlang (>= 0.2.0),
rvest (>= 0.3.2)
Suggests:
testthat (>= 1.0.2),

View File

@ -6,7 +6,7 @@
#### Changed
* Added parameters `minimum` and `as_percent` to `portion_df`
* Support for quasiquotation in the functions series `count_*` and `portions_*`, and `n_rsi`. This allow to check for more than 2 vectors or columns.
* Support for quasiquotation in the functions series `count_*` and `portions_*`, and `n_rsi`. This allows to check for more than 2 vectors or columns.
* `septic_patients %>% select(amox, cipr) %>% count_R()`
* `septic_patients %>% portion_S(amcl)`
* `septic_patients %>% portion_S(amcl, gent)`

View File

@ -22,6 +22,9 @@ test_that("counts work", {
pull(combination),
c(192, 440, 184, 474))
expect_equal(septic_patients %>% select(amox, cipr) %>% count_df(translate_ab = "official") %>% nrow(),
6)
# warning for speed loss
expect_warning(count_R(as.character(septic_patients$amcl)))
expect_warning(count_I(as.character(septic_patients$amcl)))