Learn R Programming

testthat (version 0.9.1)

not: Negate an expectation

Description

This negates an expectation, making it possible to express that you want the opposite of a standard expectation.

Usage

not(f)

Arguments

f
an existing expectation function

Examples

Run this code
x <- 1
expect_that(x, equals(1))
expect_that(x, not(equals(2)))
expect_that(x, equals(2))
expect_that(x, not(equals(1)))

Run the code above in your browser using DataLab