% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/verify.R
\name{unit_tests}
\alias{unit_tests}
\title{Display unit tests defined on a stock-and-flow model}
\usage{
unit_tests(object, test = NULL, label = NULL, ignore_case = TRUE)
}
\arguments{
\item{object}{Stock-and-flow model, object of class \code{\link{stockflow}}.}

\item{test}{Integer vector of test number(s) to display (1-based). Defaults to
\code{NULL} (show all tests). Can be combined with \code{label} (intersection).}

\item{label}{Character vector of regex patterns for partial, case-insensitive
label matching. A test is included if its label matches \emph{any} pattern.
E.g., \code{c("non-neg", "beta")} returns tests matching either fragment.
Can be combined with \code{test} (intersection).}

\item{ignore_case}{Logical; whether \code{label} matching is case-insensitive.
Default \code{TRUE}.}
}
\value{
An object of class \code{unit_tests_stockflow}, printed automatically.
}
\description{
Returns an overview of all unit tests attached to the model. The result
has a \code{print()} method.
}
\examples{
sfm <- stockflow("sir") |>
  unit_test(expr = all(susceptible >= 0)) |>
  unit_test(
    label = "recovered increases over time",
    expr = all(diff(recovered) >= 0)
  )

unit_tests(sfm)
unit_tests(sfm, test = 1L)
unit_tests(sfm, label = "increases")
}
\seealso{
\code{\link[=unit_test]{unit_test()}}, \code{\link[=verify]{verify()}}
}
\concept{unitTest}
