test_that("p_value: input checks work", {
# lengths of 'lower_bds' and 'upper_bds' mismatch
"Lengths of inputs 'lower_bds' and 'upper_bds' must match.")
# 'lower_bds' are not smaller than 'upper_bds'
"'lower_bds' must be smaller than or equal to 'upper_bds' entry-wise.")
"'seeds' must be a 2-dimensional object")
"'seeds' must be a numeric matrix or array without NA values.")
"'G' must be a function with exactly two inputs. The first one is a matrix or an array, the second one is a vector.")
test_that("p_value example runs without error", {
result <- p_value(lower_bds, upper_bds, seeds, s_sample, s_obs)

"Lengths of inputs 'lower_bds' and 'upper_bds' must match."
"'lower_bds' must be smaller than or equal to 'upper_bds' entry-wise."
"'seeds' must be a 2-dimensional object"
"'seeds' must be a numeric matrix or array without NA values."
"'G' must be a function with exactly two inputs. The first one is a matrix or an array, the second one is a vector."

`p_value(...)` threw an error with unexpected message.
Expected match: "'lower_bds' must be smaller than or equal to 'upper_bds' entry-wise."
Actual message: "unused argument (G = s_sample)"

`p_value(...)` threw an error with unexpected message.
Expected match: "'seeds' must be a 2-dimensional object"
Actual message: "unused argument (G = s_sample)"

`p_value(...)` threw an error with unexpected message.
Expected match: "'seeds' must be a numeric matrix or array without NA values."
Actual message: "unused argument (G = s_sample)"

`p_value(...)` threw an error with unexpected message.
Expected match: "'G' must be a function."
Actual message: "unused argument (G = c(1, 2))"

`p_value(...)` threw an error with unexpected message.
Expected match: "'G' must be a function with exactly two inputs. The first one is a matrix or an array, the second one is a vector."
Actual message: "unused argument (G = bad_G)"

`plot_grid(...)` threw an error with unexpected message.
Expected match: "'indivator_array' needs to be a 2-dimensional object."
Actual message: "'indicator_array' needs to be a 2-dimensional object."