tests/testthat/test-pythagoras.R

context("pythagoras")

test_that("Pythagoras works", {
  expect_equal(Pythagoras(3,4), 5)
  expect_error(Pythagoras("Nonsense","More nonsense"),
    "Pythagoras: must have two values for arguments"
  )
})
richelbilderbeek/Pythagoras-function documentation built on May 27, 2019, 7:59 a.m.