tests/testthat/test-plotting_formatting.R

load("_inputs/sim_obs.RData")

test_that("Dynamics plot with wrong args values", {
  expect_error(plot(sim, all_situations = FALSE, var = c("lai_n", "masec", "mafruit")))
  expect_error(plot(sim, all_situations = FALSE, var = c("lai_n"), type = "dynamics"))
  expect_error(plot(sim, all_situations = FALSE, var = c("lai_n"), select_dyn = "obs"))
})


test_that("Scatter plot with wrong args values", {
  expect_error(plot(sim, obs = obs, type = "scatter", var = c("lai_n", "masec", "mafruit")))
  expect_error(plot(sim, type = "scatter", var = c("lai_n"), select_scat = "obs"))
})
SticsRPacks/CroPlotR documentation built on March 1, 2025, 2:24 p.m.