tests/testthat/test-team_2.R

context("test-team_2")

test_that("team_2 works", {
  # test the file path
  datapath <- system.file("extdata", "gadm36_AUS_shp/gadm36_AUS_1.shp", package = "STAT585.Lab3.Group8.2019")
  expe <- team_2(datapath, 0.01)

  #Do not have a correct file
  expect_error(team_2(-1, 0.01))
  expect_error(team_2("A", 0.01))

  #The tolerance number is not between (0,1)
  expect_error(team_2(datapath, tolerance = -1))

})
EBlagg/STAT585.Lab3.Group8.2019 documentation built on May 29, 2019, 1:20 p.m.