28 lines
847 B
R
28 lines
847 B
R
source(file.path("..", "r-minor-helpers.R"))
|
|
|
|
test_that("pure-r (NeedsCompilation != yes) is not sensitive", {
|
|
expect_identical(classify_from_metadata("no", NA, c("Rcpp")), "not-sensitive")
|
|
expect_identical(
|
|
classify_from_metadata("", "Rcpp", c("Rcpp")),
|
|
"not-sensitive"
|
|
)
|
|
})
|
|
|
|
test_that("LinkingTo a risky dep is sensitive (version constraints stripped)", {
|
|
expect_identical(
|
|
classify_from_metadata("yes", "Rcpp (>= 1.0)", c("Rcpp")),
|
|
"sensitive"
|
|
)
|
|
expect_identical(
|
|
classify_from_metadata("yes", "R6,\n cpp11", c("Rcpp", "cpp11")),
|
|
"sensitive"
|
|
)
|
|
})
|
|
|
|
test_that("compiled but no risky LinkingTo is ambiguous (needs source)", {
|
|
expect_identical(
|
|
classify_from_metadata("yes", "R6", c("Rcpp", "cpp11")),
|
|
"ambiguous"
|
|
)
|
|
expect_identical(classify_from_metadata("yes", NA, c("Rcpp")), "ambiguous")
|
|
})
|