File: test-failure.R

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 (9 lines) | stat: -rw-r--r-- 168 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
plus <- function(x, y) 1 + 1

test_that("one plus one is two", {
  expect_equal(plus(1, 1), 2)
})

test_that("two plus two is four", {
  expect_equal(plus(2, 2), 4)
})