Skip to content

Commit

Permalink
upgrade minitest
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Oct 3, 2024
1 parent 539f6d9 commit c58a884
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/tests.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# minitest - a minimal testing framework v0.0.1 --------------------------------
# minitest - a minimal testing framework v0.0.2 --------------------------------
test_library <- function(package) library(package = package, character.only = TRUE)
test_true <- function(x) invisible(isTRUE(x) || {print(x); stop("the above was returned instead of TRUE")})
test_null <- function(x) invisible(is.null(x) || {print(x); stop("the above was returned instead of NULL")})
Expand All @@ -9,7 +9,7 @@ test_class <- function(class, x) invisible(inherits(x, class) || {stop("object o
test_equal <- function(a, b) invisible(a == b || {print(a); print(b); stop("the above expressions were not equal")})
test_identical <- function(a, b) invisible(identical(a, b) || {print(a); print(b); stop("the above expressions were not identical")})
test_print <- function(x) invisible(is.character(capture.output(print(x))) || stop("print output of expression cannot be captured as a character value"))
test_error <- function(x, containing = "") invisible(inherits(x <- tryCatch(x, error = identity), "error") && grepl(containing, x[["message"]], fixed = TRUE) || stop("expected error message containing '", containing, "' was not generated"))
test_error <- function(x, containing = "") invisible(inherits(x <- tryCatch(x, error = identity), "error") && grepl(containing, x[["message"]], fixed = TRUE) || stop("Expected error message containing: ", containing, "\nActual error message: ", x[["message"]]))
# ------------------------------------------------------------------------------

test_library("nanonext")
Expand Down

0 comments on commit c58a884

Please sign in to comment.