% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/expect-length.R
\name{expect_length}
\alias{expect_length}
\title{Does code return a vector with the specified length?}
\usage{
expect_length(object, n)
}
\arguments{
\item{object}{Object to test.

Supports limited unquoting to make it easier to generate readable failures
within a function or for loop. See \link{quasi_label} for more details.}

\item{n}{Expected length.}
}
\description{
Does code return a vector with the specified length?
}
\examples{
expect_length(1, 1)
expect_length(1:10, 10)

\dontrun{
expect_length(1:10, 1)
}
}
\seealso{
\code{\link[=expect_vector]{expect_vector()}} to make assertions about the "size" of a vector

Other expectations: 
\code{\link{comparison-expectations}},
\code{\link{equality-expectations}},
\code{\link{expect_error}()},
\code{\link{expect_match}()},
\code{\link{expect_named}()},
\code{\link{expect_null}()},
\code{\link{expect_output}()},
\code{\link{expect_reference}()},
\code{\link{expect_silent}()},
\code{\link{inheritance-expectations}},
\code{\link{logical-expectations}}
}
\concept{expectations}
