Skip to content

Commit

Permalink
Update test because changes in ChangeFreq.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielblain committed Oct 10, 2024
1 parent 8d07716 commit a582c28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-SPIChanges.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test_that("SPIChanges() works as expected in example", {
tolerance = 0.05)
expect_equal(Changes[[1]]$Actual.Acum.Prob[1:4], c(0.420, 0.486, 0.513, 0.549),
tolerance = 0.05)
expect_equal(Changes[[1]]$ChangeFreq[1:4], c(0.000, 0.000, 0.000, 0.000),
expect_equal(Changes[[1]]$ChangeFreq[1:4], c("0", "0", "NoDrought", "NoDrought"),
tolerance = 0.05)
expect_equal(Changes[[2]][1:4,3], c(1, 1, 1, 1),
tolerance = 0.00)
Expand Down Expand Up @@ -49,7 +49,7 @@ test_that("SPIChanges() works when only.linear = no", {
tolerance = 0.05)
expect_equal(Changes[[1]]$Actual.Acum.Prob[1:4], c(0.420, 0.486, 0.513, 0.549),
tolerance = 0.05)
expect_equal(Changes[[1]]$ChangeFreq[1:4], c(0.000, 0.000, 0.000, 0.000),
expect_equal(Changes[[1]]$ChangeFreq[1:4], c("0", "0", "NoDrought", "NoDrought"),
tolerance = 0.05)
expect_equal(Changes[[2]][1:4,3], c(1, 1, 1, 1),
tolerance = 0.00)
Expand Down Expand Up @@ -89,7 +89,7 @@ test_that("SPIChanges() works as expected in example", {
tolerance = 0.05)
expect_equal(Changes[[1]]$Actual.Acum.Prob[1:4], c(0.331, 0.419, 0.392, 0.418),
tolerance = 0.05)
expect_equal(Changes[[1]]$ChangeFreq[1:4], c(0.000, 0.000, 0.000, 0.000),
expect_equal(Changes[[1]]$ChangeFreq[1:4], c("0", "0", "0", "0"),
tolerance = 0.05)
expect_equal(Changes[[2]][1:4,3], c(1, 1, 1, 1),
tolerance = 0.00)
Expand Down

0 comments on commit a582c28

Please sign in to comment.