context("test-team_4")
test_that("team_4 works", {
# test the file path
datapath <- system.file("extdata", "gadm36_AUS_shp/gadm36_AUS_1.shp", package = "STAT585.Lab3.Group8.2019")
expe <- team_4(datapath, 0.01)
#Do not have a correct file
expect_error(team_4(-1, 0.01))
expect_error(team_4("A", 0.01))
#The tolerance number is not between (0,1)
expect_error(team_4(datapath, tolerance = -1))
expect_s3_class(expe, "data.frame")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.