library(rootWishartHD)

x <- seq(0, 30, length.out = 5)

y1 <- try(singleWishart_cdf(x, n_min = 5, n_max = 10,
                                      type = "double", verbose = FALSE), silent = TRUE)
y2 <- try(singleWishart_log(x, n_min = 5, n_max = 10,
                                         type = "fixed", verbose = FALSE), silent = TRUE)
y3 <- try(singleWishart_pvalue(x, n_min = 5, n_max = 10,
                               verbose = FALSE), silent = TRUE)

expect_false(inherits(y1, "try-error"))
expect_false(inherits(y2, "try-error"))
expect_false(inherits(y3, "try-error"))

bad <- try(singleWishart_cdf(-1, n_min = 5, n_max = 10,
                                       verbose = FALSE), silent = TRUE)
expect_true(inherits(bad, "try-error"))
