unit tests 2

This commit is contained in:
dr. M.S. (Matthijs) Berends 2023-01-24 16:31:00 +01:00
parent c0d8888ab7
commit 126afb01a4
3 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
Package: AMR
Version: 1.8.2.9102
Version: 1.8.2.9103
Date: 2023-01-24
Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR)

View File

@ -1,4 +1,4 @@
# AMR 1.8.2.9102
# AMR 1.8.2.9103
*(this beta version will eventually become v2.0! We're happy to reach a new major milestone soon!)*

View File

@ -55,10 +55,10 @@ expect_identical(suppressWarnings(is.rsi.eligible(example_isolates)),
suppressWarnings(is_sir_eligible(example_isolates)))
if (AMR:::pkg_is_available("ggplot2", also_load = FALSE)) {
expect_identical(suppressWarnings(ggplot_rsi(example_isolates[, c("CIP", "GEN", "TOB")])),
suppressWarnings(ggplot_sir(example_isolates[, c("CIP", "GEN", "TOB")])))
expect_equal(suppressWarnings(ggplot_rsi(example_isolates[, c("CIP", "GEN", "TOB")])),
suppressWarnings(ggplot_sir(example_isolates[, c("CIP", "GEN", "TOB")])))
p <- ggplot2::ggplot(example_isolates[, c("CIP", "GEN", "TOB")])
expect_equal(suppressWarnings(p + geom_rsi() + scale_rsi_colours() + labels_rsi_count() + facet_rsi() + theme_rsi()),
suppressWarnings(p + geom_sir() + scale_sir_colours() + labels_sir_count() + facet_sir() + theme_sir()))
suppressWarnings(p + geom_sir() + scale_sir_colours() + labels_sir_count() + facet_sir() + theme_sir()))
}