File: test-errors.R

package info (click to toggle)
r-cran-testthat 3.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,048 kB
  • sloc: cpp: 9,269; sh: 14; ansic: 14; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
test_that("simple", {
  stop("argh")
})

test_that("after one success", {
  expect_true(TRUE)
  stop("argh")
  expect_true(TRUE)
})

test_that("after one failure", {
  expect_true(FALSE)
  stop("argh")
})

test_that("in the test", {
  expect_true(stop("Argh"))
})

test_that("in expect_error", {
  expect_error(stop("Argh"))
})