@@ -18,7 +18,7 @@ test_that("nFunction auto-including nFunction works and can be controlled", {
1818 function (x = double()) {return (fn1(x )); returnType(double())}
1919 )
2020 comp <- nCompile(fn1 , nf2 )
21- expect_equal(comp $ fn2 (1 ), 2 )
21+ expect_equal(comp $ nf2 (1 ), 2 )
2222
2323 comp <- nCompile(nf2 )
2424 expect_true(is.function(comp ))
@@ -428,7 +428,8 @@ test_that("One predefined nClass can use another, separately and by inheritance,
428428 }
429429 )
430430 )
431- , compileInfo = list (interface = ' none' , createFromR = FALSE )
431+ , compileInfo = list (interface = ' none' , createFromR = FALSE ,
432+ exportName = " fooBase" )
432433 , predefined = file.path(tempdir(), " test_predefined_nC_foo_base_dir" )
433434 )
434435
@@ -441,7 +442,8 @@ test_that("One predefined nClass can use another, separately and by inheritance,
441442 )
442443 )
443444 , predefined = file.path(tempdir(), " test_predefined_nC_foo_dir" )
444- , compileInfo = list (needed_units = " foo_base" )
445+ , compileInfo = list (needed_units = " foo_base" ,
446+ exportName = " foo" )
445447 )
446448
447449 use_foo <- nClass(
@@ -452,14 +454,18 @@ test_that("One predefined nClass can use another, separately and by inheritance,
452454 )
453455 )
454456 , predefined = file.path(tempdir(), " test_predefined_nC_use_foo" )
455- , compileInfo = list (needed_units = " foo" )
457+ , compileInfo = list (needed_units = " foo" ,
458+ exportName = " use_foo" )
456459 )
457460
458461 dir <- file.path(tempdir(), " use_predefined_nC_testdir2" )
459462
460463 comp <- nCompile(use_foo , dir = dir , control = list (generate_predefined = TRUE ), package = package , returnList = TRUE )
461464 obj <- comp $ use_foo $ new()
462465 expect_equal(obj $ make_foo()$ bar(1 : 3 ), 2 : 4 )
466+
467+ # now write the next one
468+ comp <- nCompile(foo , foo_base , dir = dir , control = list (generate_predefined = TRUE ), returnList = TRUE )
463469 dir2 <- file.path(tempdir(), " use_predefined_nC_testdir2" )
464470 loading_output <- capture_output(comp2 <- nCompile(use_foo , dir = dir2 ,package = package , returnList = TRUE ))
465471 obj2 <- comp2 $ use_foo $ new()
0 commit comments