Skip to content

Commit

Permalink
Update test_forecast.R
Browse files Browse the repository at this point in the history
closes #16 adjusted for the new structure of output
  • Loading branch information
donotdespair committed Jul 20, 2024
1 parent 68d3d8d commit f3d2a90
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions inst/tinytest/test_forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ suppressMessages(


expect_identical(
ff$forecasts[1,1,1,1], ff2$forecasts[1,1,1,1],
ff[[1]]$forecasts[1,1,1], ff2[[1]]$forecasts[1,1,1],
info = "forecast: forecast identical for normal and pipe workflow."
)

expect_true(
is.numeric(ff$forecasts) & is.array(ff$forecasts),
is.numeric(ff[[1]]$forecasts) & is.array(ff[[1]]$forecasts),
info = "forecast: returns numeric array."
)

Expand Down Expand Up @@ -60,17 +60,17 @@ suppressMessages(


expect_identical(
ff$forecasts[1,1,1,1], ff2$forecasts[1,1,1,1],
ff[[1]]$forecasts[1,1,1], ff2[[1]]$forecasts[1,1,1],
info = "conditional forecast: forecast identical for normal and pipe workflow."
)

expect_equivalent(
ilo_conditional_forecasts[[1]][1,4], ff2$forecasts[1,4,1,1],
ilo_conditional_forecasts[[1]][1,4], ff2[[1]]$forecasts[4,1,1],
info = "conditional forecast: forecasts and provided conditional forecasts identical."
)

expect_true(
is.numeric(ff$forecasts) & is.array(ff$forecasts),
is.numeric(ff[[1]]$forecasts) & is.array(ff[[1]]$forecasts),
info = "conditional forecast: returns numeric array."
)

Expand Down Expand Up @@ -107,12 +107,12 @@ suppressMessages(


expect_identical(
ff$forecasts[1,1,1,1], ff2$forecasts[1,1,1,1],
ff[[1]]$forecasts[1,1,1], ff2[[1]]$forecasts[1,1,1],
info = "exogenous forecast: forecast identical for normal and pipe workflow."
)

expect_true(
is.numeric(ff$forecasts) & is.array(ff$forecasts),
is.numeric(ff[[1]]$forecasts) & is.array(ff[[1]]$forecasts),
info = "exogenous forecast: returns numeric array."
)

Expand Down

0 comments on commit f3d2a90

Please sign in to comment.