1
0
mirror of https://github.com/msberends/AMR.git synced 2025-12-14 01:10:28 +01:00

fix for keyab, more examples

This commit is contained in:
2018-07-23 10:35:39 +02:00
parent ad662d7bab
commit 9920ac8a5c
6 changed files with 50 additions and 18 deletions

View File

@@ -0,0 +1,11 @@
context("key_antibiotics.R")
test_that("keyantibiotics work", {
expect_equal(length(key_antibiotics(septic_patients, warnings = FALSE)), nrow(septic_patients))
expect_true(key_antibiotics_equal("SSS", "SSS"))
expect_false(key_antibiotics_equal("SSS", "SRS"))
expect_true(key_antibiotics_equal("SSS", "SIS", ignore_I = TRUE))
expect_false(key_antibiotics_equal("SSS", "SIS", ignore_I = FALSE))
expect_true(key_antibiotics_equal(".SS", "SI.", ignore_I = TRUE))
expect_false(key_antibiotics_equal(".SS", "SI.", ignore_I = FALSE))
})