1
0
mirror of https://github.com/msberends/AMR.git synced 2025-01-30 06:24:36 +01:00
This commit is contained in:
dr. M.S. (Matthijs) Berends 2025-01-27 16:34:26 +01:00
parent 1149360b27
commit 92166c16e8
No known key found for this signature in database

View File

@ -27,13 +27,13 @@
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
# ==================================================================== #
tryCatch(!is.function(expect_stout), error = function(e) TRUE) {
if (tryCatch(!is.function(expect_stout), error = function(e) TRUE)) {
expect_stout <<- testthat::expect_output
}
tryCatch(!is.function(expect_inherits), error = function(e) TRUE) {
if (tryCatch(!is.function(expect_inherits), error = function(e) TRUE)) {
expect_inherits <<- function(x, y, ...) testthat::expect(inherits(x, y),
failure_message = paste0("Expected class ", paste(y, collapse = "/"),
", got class ", paste(class(x), collapse = "/")))
failure_message = paste0("Expected class ", paste(y, collapse = "/"),
", got class ", paste(class(x), collapse = "/")))
}
expect_equal(AMR:::percentage(0.25), "25%")