You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Examples/test-suite/r/li_boost_shared_ptr_runme.R
+16-14Lines changed: 16 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ testSuite <- function() {
80
80
testSuite_verifyCount(2, kret)
81
81
}
82
82
83
-
if (FALSE) {
83
+
{
84
84
# pass by shared_ptr pointer reference
85
85
k= Klass("me oh my")
86
86
kret= smartpointerpointerreftest(k)
@@ -90,7 +90,7 @@ testSuite <- function() {
90
90
testSuite_verifyCount(2, kret)
91
91
}
92
92
93
-
if (FALSE) {
93
+
{
94
94
# pass by shared_ptr pointer reference
95
95
k= Klass("me oh my");
96
96
kret= smartpointerpointerreftest(k);
@@ -288,7 +288,7 @@ testSuite <- function() {
288
288
k= KlassDerived("me oh my");
289
289
kret= smartpointerpointerreftest(k);
290
290
val=kret$getValue();
291
-
unittest("me oh my derivedsmartptrpointerreftest-Derived", val);
291
+
unittest("me oh my derivedsmartptrpointerreftest-Derived", val);# fails "me oh my derivedsmartptrpointerreftest-Derived != me oh my smartpointerpointerreftest-Derived"
292
292
testSuite_verifyCount(2, k); # includes two extra references for upcasts in the proxy classes
293
293
testSuite_verifyCount(2, kret);
294
294
}
@@ -300,9 +300,10 @@ testSuite <- function() {
300
300
val=kret$getValue()
301
301
unittest("me oh my valuetest", val) # note slicing
302
302
testSuite_verifyCount(2, k)
303
-
#testSuite_verifyCount(2, kret) --> use count not defined for _p_Space__Klass
303
+
testSuite_verifyCount(1, kret)
304
304
305
-
# testSuite_verifyCount(1, k) # this is the python expected reference counting
305
+
# --> these are the python expected counting
306
+
# testSuite_verifyCount(1, k)
306
307
# testSuite_verifyCount(1, kret)
307
308
}
308
309
@@ -323,9 +324,10 @@ testSuite <- function() {
323
324
val=kret$getValue();
324
325
unittest("me oh my reftest-Derived", val);
325
326
testSuite_verifyCount(2, k);
326
-
#testSuite_verifyCount(2, kret); --> use_count not defined for _p_Space__KlassDerived
327
+
testSuite_verifyCount(1, kret);
327
328
328
-
#testSuite_verifyCount(1, k); # --> this is the python expected counting
0 commit comments