identicalTo: Returns a function that checks whether its _argument_ is...

Description Usage Arguments See Also Examples

View source: R/hamcrest.R

Description

Returns a function that checks whether its argument is identical to an expected result

Usage

1
identicalTo(expected, tol = NULL)

Arguments

expected

object passed to the matcher function.

tol

numeric tolerance. Should note that tol is only used if the expected value is a finite floating point number. If the expected value is another type, such as an integer, an exact match is expected.

See Also

Examples

1
2
3
4
## Not run: 
assertThat(floor(-1.5), identicalTo(-2))

## End(Not run)

bedatadriven/hamcrest documentation built on Dec. 1, 2019, 1:49 p.m.