Nothing
objective_option_hoist_source <- function() {
candidates <- c(
testthat::test_path("..", "..", "src", "jksum.c"),
testthat::test_path("..", "..", "..", "src", "jksum.c"),
file.path(Sys.getenv("R_PACKAGE_DIR", ""), "src", "jksum.c"),
file.path(Sys.getenv("R_PACKAGE_SOURCE", ""), "src", "jksum.c"),
file.path(getwd(), "src", "jksum.c"),
file.path(getwd(), "..", "src", "jksum.c")
)
candidates <- unique(candidates[nzchar(candidates)])
hits <- candidates[file.exists(candidates)]
if (!length(hits))
return(NULL)
paste(np_test_read_incumbent_c_source(hits[[1L]], warn = FALSE), collapse = "\n")
}
test_that("LP objectives freeze the Apple acceleration option only per call", {
text <- objective_option_hoist_source()
skip_if(is.null(text), "package C sources unavailable")
expect_match(text, "int runtime_options_frozen;")
expect_match(
text,
"if\\(\\(outer_pack_ctx == NULL\\) \\|\\|\\s*!outer_pack_ctx->runtime_options_frozen\\)"
)
expect_match(text, "const NP_OuterPackCtx frozen_runtime_options")
expect_match(text, "\\.runtime_options_frozen = 1")
expect_match(text, "&frozen_runtime_options")
expect_match(text, "&objective_pack_ctx")
expect_gte(length(regmatches(
text, gregexpr("&objective_pack_ctx,", text, fixed = TRUE)
)[[1L]]), 2L)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.