1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-12 05:02:03 +02:00

(v1.4.0.9039) more unit tests

This commit is contained in:
2020-12-13 20:44:32 +01:00
parent ac22b8d5c1
commit 203bc20eb0
27 changed files with 100 additions and 63 deletions

View File

@ -43,9 +43,11 @@ test_that("mic works", {
expect_s3_class(x[[1]], "mic")
expect_s3_class(c(x[1], x[9]), "mic")
expect_s3_class(unique(x[1], x[9]), "mic")
expect_s3_class(droplevels(c(x[1], x[9])), "mic")
x[2] <- 32
expect_s3_class(x, "mic")
expect_warning(as.mic("INVALID VALUE"))
pdf(NULL) # prevent Rplots.pdf being created
expect_silent(barplot(as.mic(c(1, 2, 4, 8))))
expect_silent(plot(as.mic(c(1, 2, 4, 8))))
@ -56,4 +58,7 @@ test_that("mic works", {
"<NA>" = "0",
"Min." = "2",
"Max." = "8"), class = c("summaryDefault", "table")))
library(dplyr, warn.conflicts = FALSE)
expect_output(print(tibble(m = as.mic(2:4))))
})