tests/testthat/test-frf_konno_ohmachi.R

test_that("konno_ohmachi works", {

  library(stats)
  library(RcppParallel)
  library(Rcpp)
  library(RcppArmadillo)

  n <- 2000
  x <- rnorm(n)
  f <- 1:n

  expect_equal(is.numeric(konno_ohmachi_serial(x, f, 10)), TRUE)
  expect_equal(is.numeric(konno_ohmachi_parallel(x, f, 10)), TRUE)

  # currently a problem when run with covr
  expect_equal(konno_ohmachi_parallel(x, f, 10),
               konno_ohmachi_serial(x, f, 10))
  
})
jkennel/waterlevel documentation built on Dec. 1, 2019, 6:24 p.m.