File: expect_length.Rd

package info (click to toggle)
r-cran-tinytest 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,072 kB
  • sloc: sh: 14; makefile: 2
file content (34 lines) | stat: -rw-r--r-- 845 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/expectations.R
\name{expect_length}
\alias{expect_length}
\title{Check length of an object}
\usage{
expect_length(current, length, info = NA_character_, ...)
}
\arguments{
\item{current}{\code{[object]} An R object with a length}

\item{length}{\code{[integer]} A nonnegative integer}

\item{info}{\code{[character]} scalar. Optional user-defined message. Must
be a single character string. Multiline comments may be separated by}

\item{...}{Currently not used.}
}
\description{
Check length of an object
}
\examples{
expect_length(3:4, 2) # TRUE
expect_length(2:5, 1) # FALSE

}
\seealso{
Other test-functions: 
\code{\link{expect_equal_to_reference}()},
\code{\link{expect_equal}()},
\code{\link{expect_match}()},
\code{\link{ignore}()}
}
\concept{test-functions}