File: test-failure.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 (9 lines) | stat: -rw-r--r-- 168 bytes parent folder | download | duplicates (4)
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)
})