File: comparison-expectations.Rd

package info (click to toggle)
r-cran-testthat 3.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,452 kB
  • sloc: cpp: 9,261; ansic: 37; sh: 14; makefile: 5
file content (56 lines) | stat: -rw-r--r-- 1,369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/expect-comparison.R
\name{comparison-expectations}
\alias{comparison-expectations}
\alias{expect_lt}
\alias{expect_lte}
\alias{expect_gt}
\alias{expect_gte}
\title{Does code return a number greater/less than the expected value?}
\usage{
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)
}
\arguments{
\item{object, expected}{A value to compare and its expected bound.}

\item{label, expected.label}{Used to customise failure messages. For expert
use only.}
}
\description{
Does code return a number greater/less than the expected value?
}
\examples{
a <- 9
expect_lt(a, 10)

\dontrun{
expect_lt(11, 10)
}

a <- 11
expect_gt(a, 10)
\dontrun{
expect_gt(9, 10)
}
}
\seealso{
Other expectations: 
\code{\link{equality-expectations}},
\code{\link{expect_error}()},
\code{\link{expect_length}()},
\code{\link{expect_match}()},
\code{\link{expect_named}()},
\code{\link{expect_null}()},
\code{\link{expect_output}()},
\code{\link{expect_reference}()},
\code{\link{expect_silent}()},
\code{\link{inheritance-expectations}},
\code{\link{logical-expectations}}
}
\concept{expectations}