Expectation: does a vector have the specified length?

expect_length(object, n)

Arguments

object

object to test

n

Expected length.

See also

Examples

expect_length(1, 1) expect_length(1:10, 10)
# NOT RUN { expect_length(1:10, 1) # }