@@ -60,9 +60,9 @@ test_that("nCompile direct, package, and writePackage work with Eigen::Tensors",
6060 test <- writePackage(add_vectors , pkgName = " testpackage" , dir = dir , modify = " clear" )
6161 lib <- file.path(tempdir(), " test_nComp_lib" )
6262 dir.create(lib , showWarnings = FALSE )
63- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
63+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
6464 upgrade = " never" , quick = TRUE , quiet = TRUE ))
65- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
65+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
6666 expect_equal(x1 + x2 , access_dynamic_package(" testpackage" , " add_vectors" )(x1 , x2 )) # testpackage::add_vectors(x1, x2))
6767 pkgload :: unload(" testpackage" )
6868})
@@ -110,9 +110,9 @@ test_that("nCompile direct, package, and writePackage work with nClass interface
110110 test <- writePackage(nc , pkgName = " testpackage" , dir = dir , modify = " clear" )
111111 lib <- file.path(tempdir(), " test_nComp_lib" )
112112 dir.create(lib , showWarnings = FALSE )
113- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
113+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
114114 upgrade = " never" , quick = TRUE , quiet = TRUE ))
115- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
115+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
116116 obj <- access_dynamic_package(" testpackage" , " nc" )$ new() # testpackage::nc$new()
117117 expect_equal(x1 + x2 , obj $ add_vectors(x1 , x2 ))
118118 CppObj <- obj $ private $ CppObj
@@ -123,9 +123,9 @@ test_that("nCompile direct, package, and writePackage work with nClass interface
123123 test <- writePackage(nc , pkgName = " testpackage" , interfaces = " generic" , dir = dir , modify = " clear" )
124124 lib <- file.path(tempdir(), " test_nComp_lib" )
125125 dir.create(lib , showWarnings = FALSE )
126- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
126+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
127127 upgrade = " never" , quick = TRUE , quiet = TRUE ))
128- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
128+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
129129 CppObj <- access_dynamic_package(" testpackage" , " nc" )() # testpackage::nc()
130130 expect_equal(x1 + x2 , method(CppObj , ' add_vectors' )(x1 , x2 ))
131131 obj <- to_full_interface(CppObj )
@@ -183,9 +183,9 @@ test_that("nCompile direct, package, and writePackage work with various name man
183183 test <- writePackage(add.Scalars , pkgName = " testpackage" , dir = dir , modify = " clear" )
184184 lib <- file.path(tempdir(), " test_nComp_lib" )
185185 dir.create(lib , showWarnings = FALSE )
186- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
186+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
187187 upgrade = " never" , quick = TRUE , quiet = TRUE ))
188- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
188+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
189189 expect_equal(access_dynamic_package(" testpackage" , " add.Scalars" )(2 , 3 ), 5 ) # testpackage::add.Scalars(2, 3), 5)
190190 pkgload :: unload(" testpackage" )
191191
@@ -198,9 +198,9 @@ test_that("nCompile direct, package, and writePackage work with various name man
198198 test <- writePackage(add.Scalars_name , pkgName = " testpackage" , dir = dir , modify = " clear" )
199199 lib <- file.path(tempdir(), " test_nComp_lib" )
200200 dir.create(lib , showWarnings = FALSE )
201- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
201+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
202202 upgrade = " never" , quick = TRUE , quiet = TRUE ))
203- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
203+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
204204 expect_equal(access_dynamic_package(" testpackage" , " add.Scalars_name" )(2 , 3 ), 5 ) # testpackage::add.Scalars_name(2, 3), 5)
205205 pkgload :: unload(" testpackage" )
206206
@@ -213,9 +213,9 @@ test_that("nCompile direct, package, and writePackage work with various name man
213213 test <- writePackage(add.Scalars_eName , pkgName = " testpackage" , dir = dir , modify = " clear" )
214214 lib <- file.path(tempdir(), " test_nComp_lib" )
215215 dir.create(lib , showWarnings = FALSE )
216- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
216+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
217217 upgrade = " never" , quick = TRUE , quiet = TRUE ))
218- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
218+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
219219 expect_equal(access_dynamic_package(" testpackage" , " foo1" )(2 , 3 ), 5 ) # testpackage::foo1(2, 3), 5)
220220 pkgload :: unload(" testpackage" )
221221
@@ -228,9 +228,9 @@ test_that("nCompile direct, package, and writePackage work with various name man
228228 test <- writePackage(add.Scalars_name_eName , pkgName = " testpackage" , dir = dir , modify = " clear" )
229229 lib <- file.path(tempdir(), " test_nComp_lib" )
230230 dir.create(lib , showWarnings = FALSE )
231- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
231+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
232232 upgrade = " never" , quick = TRUE , quiet = TRUE ))
233- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
233+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
234234 expect_equal(access_dynamic_package(" testpackage" , " foo2" )(2 , 3 ), 5 ) # testpackage::foo2(2, 3), 5)
235235 pkgload :: unload(" testpackage" )
236236})
@@ -329,9 +329,9 @@ test_that("nCompile works for nClass with classname and/or exportName and either
329329 test <- writePackage(nc , interfaces = " generic" , pkgName = " testpackage" , dir = dir , modify = " clear" )
330330 lib <- file.path(tempdir(), " test_nComp_lib2" )
331331 dir.create(lib , showWarnings = FALSE )
332- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
332+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
333333 upgrade = " never" , quick = TRUE , quiet = TRUE ))
334- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
334+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
335335 obj <- access_dynamic_package(" testpackage" , " nc" )(); test_obj(obj )
336336 objf <- to_full_interface(obj ); test_obj(objf )
337337 rm(obj , objf ); gc(); pkgload :: unload(" testpackage" )
@@ -342,9 +342,9 @@ test_that("nCompile works for nClass with classname and/or exportName and either
342342 test <- writePackage(nc , pkgName = " testpackage" , dir = dir , modify = " clear" )
343343 lib <- file.path(tempdir(), " test_nComp_lib2" )
344344 dir.create(lib , showWarnings = FALSE )
345- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
345+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
346346 upgrade = " never" , quick = TRUE , quiet = TRUE ))
347- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
347+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
348348 obj <- access_dynamic_package(" testpackage" , " nc" )$ new(); test_obj(obj )
349349 objC <- obj $ private $ CppObj ; test_obj(objC )
350350 rm(obj , objC ); gc()
@@ -380,9 +380,9 @@ test_that("nCompile works for nClass with classname and/or exportName and either
380380 test <- writePackage(nc_name , interfaces = " generic" , pkgName = " testpackage" , dir = dir , modify = " clear" )
381381 lib <- file.path(tempdir(), " test_nComp_lib2" )
382382 dir.create(lib , showWarnings = FALSE )
383- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
383+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
384384 upgrade = " never" , quick = TRUE , quiet = TRUE ))
385- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
385+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
386386 obj <- access_dynamic_package(" testpackage" , " nc_name" )(); test_obj(obj )
387387 objf <- to_full_interface(obj ); test_obj(objf )
388388 rm(obj , objf ); gc(); pkgload :: unload(" testpackage" )
@@ -393,9 +393,9 @@ test_that("nCompile works for nClass with classname and/or exportName and either
393393 test <- writePackage(nc_name , pkgName = " testpackage" , dir = dir , modify = " clear" )
394394 lib <- file.path(tempdir(), " test_nComp_lib2" )
395395 dir.create(lib , showWarnings = FALSE )
396- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
396+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
397397 upgrade = " never" , quick = TRUE , quiet = TRUE ))
398- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
398+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
399399 obj <- access_dynamic_package(" testpackage" , " nc_name" )$ new(); test_obj(obj )
400400 objC <- obj $ private $ CppObj ; test_obj(objC )
401401 rm(obj , objC ); gc(); pkgload :: unload(" testpackage" )
@@ -432,9 +432,9 @@ test_that("nCompile works for nClass with classname and/or exportName and either
432432 test <- writePackage(nc_eName , interfaces = " generic" , pkgName = " testpackage" , dir = dir , modify = " clear" )
433433 lib <- file.path(tempdir(), " test_nComp_lib2" )
434434 dir.create(lib , showWarnings = FALSE )
435- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
435+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
436436 upgrade = " never" , quick = TRUE , quiet = TRUE ))
437- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
437+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
438438 obj <- access_dynamic_package(" testpackage" , " exnc1" )(); test_obj(obj )
439439 objf <- to_full_interface(obj ); test_obj(objf )
440440 rm(obj , objf ); gc(); pkgload :: unload(" testpackage" )
@@ -445,9 +445,9 @@ test_that("nCompile works for nClass with classname and/or exportName and either
445445 test <- writePackage(nc_eName , pkgName = " testpackage" , dir = dir , modify = " clear" )
446446 lib <- file.path(tempdir(), " test_nComp_lib2" )
447447 dir.create(lib , showWarnings = FALSE )
448- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
448+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
449449 upgrade = " never" , quick = TRUE , quiet = TRUE ))
450- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
450+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
451451 obj <- access_dynamic_package(" testpackage" , " exnc1" )$ new(); test_obj(obj )
452452 objC <- obj $ private $ CppObj ; test_obj(objC )
453453 rm(obj , objC ); gc(); pkgload :: unload(" testpackage" )
@@ -483,9 +483,9 @@ test_that("nCompile works for nClass with classname and/or exportName and either
483483 test <- writePackage(nc_name_eName , interfaces = " generic" , pkgName = " testpackage" , dir = dir , modify = " clear" )
484484 lib <- file.path(tempdir(), " test_nComp_lib2" )
485485 dir.create(lib , showWarnings = FALSE )
486- withr :: with_libpaths(lib , devtools :: install(file.path(dir , " testpackage" ),
486+ withr :: with_libpaths(lib , action = " prefix " , code = devtools :: install(file.path(dir , " testpackage" ),
487487 upgrade = " never" , quick = TRUE , quiet = TRUE ))
488- withr :: with_libpaths(lib , load_dynamic_namespace(" testpackage" ))
488+ withr :: with_libpaths(lib , action = " prefix " , code = load_dynamic_namespace(" testpackage" ))
489489 obj <- access_dynamic_package(" testpackage" , " exnc2" )(); test_obj(obj )
490490 objf <- to_full_interface(obj ); test_obj(objf )
491491 rm(obj , objf ); gc(); pkgload :: unload(" testpackage" )
0 commit comments