tests/testthat/test-maximum.R

library(testthat)
library(data.summary)

context("Maximum")

test_that("Check results", {

  x <- 1:10

  expect_equal(maximum(x), 10)

  y <- c(10, 13, -3, 55, 100, -2)

  expect_equal(maximum(y), 100)

  z <- rnorm(20)

  expect_equal(maximum(z), max(z))

  k <- c(-5, -20, -105, -33)

  expect_equal(maximum(k),-5)


})
AshleyDennisHenderson/data.summary documentation built on June 12, 2019, 11:25 a.m.