context("test-team_10")
test_that("takes in correct path", {
# expect an error due to incorrect path
expect_error(team_10(c(8, 13), 0.01))
# expect an error due to incorrect path
expect_error(team_10("testing", 0.01))
})
test_that("tolerance is correct", {
# expect error due to tolerance
filepath <- system.file("inst/gadm36_AUS_1.shp", package ="stat585lab3package")
expect_error(team_10(filepath, "a"))
})
test_that("output is dataframe", {
# expect data frame
filepath <- system.file("inst/gadm36_AUS_1.shp", package ="stat585lab3package")
expect_s3_class(team_10(filepath, 0.01), "data.frame")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.