"contours must be either 'T', 'F', TRUE, or FALSE"
"'by' must be specified and numeric when including contours."
"breaks must be in vector format: c(1,2,3,...)"
"not all elements of breaks are numeric"
"contours must be T when including breaks"

test_that("calcHyps input data checks", {
expect_error(calcHyps(wrong, DEMunits = "m", depthUnits = "ft", by = 1, output = "values"), info = "DEM must be a SpatRaster object. Convert using 'rast' function in package 'terra'.")
expect_error(calcHyps(DEM, DEMunits = "ft", depthUnits = "ft", by = 1, output = "values"), info = "DEM units misspecified. Please choose either 'm', 'km', or 'ha'")
expect_error(calcHyps(DEM, DEMunits = "m", depthUnits = "ft", by = 0, output = "values"), info = "by can't be zero")
expect_error(calcHyps(DEM, DEMunits = "m", depthUnits = "ft", by = m, output = "values"), info = "by value must be numeric.")
expect_error(calcHyps(DEM, DEMunits = "m", depthUnits = "ha", by = 1, output = "values"), info = "depthUnits not specified, must be 'ft' or 'm'")
expect_error(calcHyps(DEM, DEMunits = "m", depthUnits = "ft", by = 1, output = NULL), info = "output not specified, must be 'values' or 'plot'")
expect_s3_class(calcHyps(dat, DEMunits = "m", depthUnits = "m", by = 2, output = "values"), class = "data.frame")
expect_s3_class(calcHyps(dat, DEMunits = "m", depthUnits = "m", by = 2, output = "plot"), class = "ggplot")

"DEM units misspecified. Please choose either 'm', 'km', or 'ha'"
"depthUnits not specified, must be 'ft' or 'm'"
"output not specified, must be 'values' or 'plot'"

"DEMunits misspecified. Please choose 'm', 'km', or 'ha'"
"depthUnits misspecified. Please choose 'm' or 'ft'"
"secchi cannot exceed maximum waterbody depth"

test_that("calcSDI input data checks", {
expect_error(calcSDI(wrong, units = "m", by = 1, stop = NULL), info = "DEM must be a SpatRaster object. Convert using 'rast' function in package 'terra'.")
expect_error(calcSDI(dat, units = "ft", by = 1, stop = NULL), info = "Units misspecified. Please choose 'm', 'km', or 'ha'")
expect_error(calcSDI(dat, units = "m", by = 0, stop = NULL), info = "by can't be zero")
expect_error(calcSDI(dat, units = "m", by = m, stop = NULL), info = "by value must be numeric")
expect_error(calcSDI(dat, units = "m", by = 1, stop = m), info = "stop must be numeric")
expect_error(calcSDI(dat, units = "m", by = 5, stop = 2), info = "stop cannot be less than 'by'")
expect_s3_class(calcSDI(dat, units = "m", by = 10, stop = NULL), class = "data.frame")