| comparison-expectations | R Documentation |
Does code return a number greater/less than the expected value?
expect_lt(object, expected, label = NULL, expected.label = NULL)
expect_lte(object, expected, label = NULL, expected.label = NULL)
expect_gt(object, expected, label = NULL, expected.label = NULL)
expect_gte(object, expected, label = NULL, expected.label = NULL)
object, expected |
A value to compare and its expected bound. |
label, expected.label |
Used to customise failure messages. For expert use only. |
Other expectations:
equality-expectations,
expect_error(),
expect_length(),
expect_match(),
expect_named(),
expect_null(),
expect_output(),
expect_reference(),
expect_silent(),
inheritance-expectations,
logical-expectations
a <- 9
expect_lt(a, 10)
## Not run:
expect_lt(11, 10)
## End(Not run)
a <- 11
expect_gt(a, 10)
## Not run:
expect_gt(9, 10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.