Learn R Programming

testthat (version 0.2)

is_identical_to: Expectation: is the object identical to another?

Description

Expectation: is the object identical to another?

Usage

is_identical_to(expected)

Arguments

expected
expected value

Details

Comparison performed using identical.

Examples

Run this code
a <- letters[1:3]
expect_that(a, is_identical_to(c("a", "b", "c")))

# Identical does not take into account numeric tolerance
expect_that(sqrt(2) ^ 2, is_identical_to(2))

Run the code above in your browser using DataLab