Skip to content

Commit

Permalink
Fix test warnings via class expectations on errors (#10).
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoporreca committed Feb 25, 2020
1 parent cf4669f commit e4ac407
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-TRNG.Engine.R
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ test_that("$split errors for out-of-range subsequence indices", {
p <- 5L
if (!grepl("(lagfib|mt)", engineClass)) {
expect_error(
e$split(p, 0L), "invalid", # 1-base indexing
e$split(p, 0L), class = "std::invalid_argument", # 1-base indexing
info = .name(engineClass)
)
expect_error(
e$split(p, p + 1L), "invalid",
e$split(p, p + 1L), class = "std::invalid_argument",
info = .name(engineClass)
)
expect_error(
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-TRNG.Random.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ test_that("TRNGsplit errors for out-of-range subsequence indices", {
TRNGkind(KIND)
TRNGseed(SEED)
p <- 5L
expect_error(TRNGsplit(p, 0L), "invalid") # 1-base indexing
expect_error(TRNGsplit(p, p + 1L), "invalid")
expect_error(TRNGsplit(p, 0L), class = "std::invalid_argument") # 1-base indexing
expect_error(TRNGsplit(p, p + 1L), class = "std::invalid_argument")
expect_error(TRNGsplit(p, -1L), "negative")
expect_error(TRNGsplit(-1L, 1L), "negative")
})

0 comments on commit e4ac407

Please sign in to comment.