tests/testthat/test-nino.R

context("Test NINO stacks")

test_that("a new NINO stack is empty, is a 'stack' object, 
          and is a 'nino' object", {
  s <- nino()
  expect_true(is.empty(s))
  expect_true(is.stack(s))
  expect_true(is.nino(s))
  x <- stats::runif(1)
  push(s, x)
  expect_error(pop(s))
})

Try the flifo package in your browser

Any scripts or data that you put into this service are public.

flifo documentation built on May 2, 2019, 1:26 a.m.