tests/testthat/test-lets_midpoint.R

context("Test for lets.midpoint")

data(PAM)

test_that("lets.midpoint works fine", {
  
  
  resu_test <- lets.midpoint(PAM)
  
  expect_equal(class(resu_test), "data.frame")
  expect_true(ncol(resu_test) == 3)
  expect_true(!any(is.na(resu_test)))
})

test_that("lets.midpoint works fine, planar = TRUE", {
  
  
  resu_test <- lets.midpoint(PAM, planar = TRUE)
  
  expect_equal(class(resu_test), "data.frame")
  expect_true(ncol(resu_test) == 3)
  expect_true(!any(is.na(resu_test)))
})

Try the letsR package in your browser

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

letsR documentation built on June 20, 2017, 9:08 a.m.