assertTrue: Assert that the value evaluates to true

Description Usage Arguments Details See Also Examples

View source: R/hamcrest.R

Description

Asserts that the given value evaluates to TRUE. If the value evaluates does not evaluate to TRUE, then an error condition is raised.

Usage

1
assertTrue(value)

Arguments

value

a vector with any length.

Details

The identical function is used to check this condition, so this function will also raise an error condition if value evaluates to 0 or if the result of the evaluation has any attributes.

See Also

Examples

1
2
3
4
5
## Not run: 
assertTrue(is.numeric(2019))
assertThat(is.character("orange"), isTRUE)

## End(Not run)

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