Skip to content

Commit

Permalink
coverage markers
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed May 10, 2024
1 parent b66c306 commit b139a84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ static void PreserveObjects(void) {
Rf_classgets(nano_unresolved, Rf_mkString("unresolvedValue"));
}

// # nocov start
static void ReleaseObjects(void) {
R_ReleaseObject(nano_unresolved);
R_ReleaseObject(nano_success);
Expand All @@ -129,6 +130,7 @@ static void ReleaseObjects(void) {
R_ReleaseObject(nano_aioFuncs);
R_ReleaseObject(nano_aioFormals);
}
// # nocov end

static const R_CallMethodDef callMethods[] = {
{"rnng_aio_call", (DL_FUNC) &rnng_aio_call, 1},
Expand Down Expand Up @@ -219,6 +221,8 @@ void attribute_visible R_init_nanonext(DllInfo* dll) {
R_forceSymbols(dll, TRUE);
}

// # nocov start
void attribute_visible R_unload_nanonext(DllInfo *info) {
ReleaseObjects();
}
// # nocov end
1 change: 1 addition & 0 deletions tests/tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ nanotest(is.environment(set_promise_context(new.env(), new.env())))

nanotest(base64enc("test") == "dGVzdA==")
nanotest(base64dec(base64enc("test")) == "test")
nanotest(is.character(base64enc(c("vector", "test"))))
nanotest(is.raw(base64enc(data.frame(), convert = FALSE)))
nanotest(is.raw(base64dec(base64enc(as.raw(c(1L, 2L)), convert = FALSE), convert = FALSE)))
nanotest(is.integer(base64dec(base64enc(c(1L, 2L)), convert = NA)))
Expand Down

0 comments on commit b139a84

Please sign in to comment.