File: oldskool.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 (65 lines) | stat: -rw-r--r-- 1,595 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
57
58
59
60
61
62
63
64
65
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/old-school.R
\name{oldskool}
\alias{oldskool}
\alias{is_null}
\alias{is_a}
\alias{is_true}
\alias{is_false}
\alias{has_names}
\alias{is_less_than}
\alias{is_more_than}
\alias{equals}
\alias{is_equivalent_to}
\alias{is_identical_to}
\alias{equals_reference}
\alias{shows_message}
\alias{gives_warning}
\alias{prints_text}
\alias{throws_error}
\alias{matches}
\title{Old-style expectations.}
\usage{
is_null()

is_a(class)

is_true()

is_false()

has_names(expected, ignore.order = FALSE, ignore.case = FALSE)

is_less_than(expected, label = NULL, ...)

is_more_than(expected, label = NULL, ...)

equals(expected, label = NULL, ...)

is_equivalent_to(expected, label = NULL)

is_identical_to(expected, label = NULL)

equals_reference(file, label = NULL, ...)

shows_message(regexp = NULL, all = FALSE, ...)

gives_warning(regexp = NULL, all = FALSE, ...)

prints_text(regexp = NULL, ...)

throws_error(regexp = NULL, ...)

matches(regexp, all = TRUE, ...)
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}}

Initial testthat used a style of testing that looked like
\verb{expect_that(a, equals(b)))} this allowed expectations to read like
English sentences, but was verbose and a bit too cutesy. This style
will continue to work but has been soft-deprecated - it is no longer
documented, and new expectations will only use the new style
\code{expect_equal(a, b)}.
}
\keyword{internal}