make_expectation: Make an equality test.

View source: R/make-expectation.R

make_expectationR Documentation

Make an equality test.

Description

This a convenience function to make a expectation that checks that input stays the same.

Usage

make_expectation(x, expectation = "equals")

Arguments

x

a vector of values

expectation

the type of equality you want to test for ("equals", "is_equivalent_to", "is_identical_to")

Examples

x <- 1:10
make_expectation(x)

make_expectation(mtcars$mpg)

df <- data.frame(x = 2)
make_expectation(df)

hadley/testthat documentation built on Feb. 16, 2024, 9:20 p.m.