mirror of
https://github.com/msberends/AMR.git
synced 2026-10-01 04:13:33 +02:00
unit test
This commit is contained in:
1 parent
1a02d302d4
commit
ad3061c754
3 files changed
+4
-9
No files matched your search
@@ -279,13 +279,8 @@ expect_equal(suppressWarnings(as.mo("Virus")), as.mo("UNKNOWN"))
|
||||
expect_equal(length(summary(example_isolates$mo)), 6)
|
||||
|
||||
# WHONET codes and NA/NaN
|
||||
expect_equal(
|
||||
as.character(as.mo(c("xxx", "na", "nan"))),
|
||||
rep(NA_character_, 3)
|
||||
)
|
||||
expect_equal(as.character(as.mo("con")), "UNKNOWN")
|
||||
expect_equal(as.character(as.mo("xxx")), NA_character_)
|
||||
expect_equal(as.character(as.mo(c("xxx", "con", "eco"))), c(NA_character_, "UNKNOWN", "B_ESCHR_COLI"))
|
||||
expect_true(all(is.na(as.mo(c("xxx", "na", "nan")))))
|
||||
expect_equal(as.character(as.mo(c("con", "eco"))), c("UNKNOWN", "B_ESCHR_COLI"))
|
||||
expect_equal(
|
||||
as.character(suppressWarnings(as.mo(c("other", "none", "unknown")))),
|
||||
rep("UNKNOWN", 3)
|
||||
|
||||
Reference in new issue
Block a user