☰
Debian Codegraph
@
1.2.4+dfsg-1
1.2.3+dfsg-1
/
/
tests
/
testthat
/
test-once.R
☽
☼
tests/testthat/test-once.R
code
plain
raw
MIT
2000-2023 Posit Software, PBC
debian/copyright
1
2
test_that("once() returns TRUE only once", {
3
4
method <- function() {
5
expect_true(once())
6
expect_false(once())
7
expect_false(once())
8
}
9
10
method()
11
expect_error(method())
12
13
})