diff --git a/src/init.c b/src/init.c index 8fee786ae..e5f804b47 100644 --- a/src/init.c +++ b/src/init.c @@ -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); @@ -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}, @@ -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 diff --git a/tests/tests.R b/tests/tests.R index bb61fbbe7..55e7b0017 100644 --- a/tests/tests.R +++ b/tests/tests.R @@ -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)))