Skip to content

Commit 63632f8

Browse files
committed
Correct raw pointer handling test for virtual inheritance
1 parent 1f2338b commit 63632f8

12 files changed

+16
-14
lines changed

Examples/test-suite/octave/cpp11_std_unique_ptr_runme.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function checkCount(expected_count)
1515
# Test raw pointer handling involving virtual inheritance
1616
kini = KlassInheritance("KlassInheritanceInput");
1717
checkCount(1);
18-
s = takeKlassUniquePtr(kini);
18+
s = useKlassRawPtr(kini);
1919
if (!strcmp(s, "KlassInheritanceInput"))
2020
error("Incorrect string: %s", s);
2121
endif

Examples/test-suite/octave/li_std_auto_ptr_runme.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function checkCount(expected_count)
1515
# Test raw pointer handling involving virtual inheritance
1616
kini = KlassInheritance("KlassInheritanceInput");
1717
checkCount(1);
18-
s = takeKlassAutoPtr(kini);
18+
s = useKlassRawPtr(kini);
1919
if (!strcmp(s, "KlassInheritanceInput"))
2020
error("Incorrect string: %s", s);
2121
endif

Examples/test-suite/perl5/cpp11_std_unique_ptr_runme.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ sub checkCount {
1616
{
1717
my $kini = new cpp11_std_unique_ptr::KlassInheritance("KlassInheritanceInput");
1818
checkCount(1);
19-
my $s = cpp11_std_unique_ptr::takeKlassUniquePtr($kini);
19+
my $s = cpp11_std_unique_ptr::useKlassRawPtr($kini);
2020
is($s, "KlassInheritanceInput", "Incorrect string: $s");
2121
undef $kini;
2222
checkCount(0);

Examples/test-suite/perl5/li_std_auto_ptr_runme.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ sub checkCount {
1616
{
1717
my $kini = new li_std_auto_ptr::KlassInheritance("KlassInheritanceInput");
1818
checkCount(1);
19-
my $s = li_std_auto_ptr::takeKlassAutoPtr($kini);
19+
my $s = li_std_auto_ptr::useKlassRawPtr($kini);
2020
is($s, "KlassInheritanceInput", "Incorrect string: $s");
2121
undef $kini;
2222
checkCount(0);

Examples/test-suite/php/cpp11_std_unique_ptr_runme.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function checkCount($expected_count) {
1010
# Test raw pointer handling involving virtual inheritance
1111
$kini = new KlassInheritance("KlassInheritanceInput");
1212
checkCount(1);
13-
$s = takeKlassUniquePtr($kini);
13+
$s = useKlassRawPtr($kini);
1414
check::equal($s, "KlassInheritanceInput", "Incorrect string: $s");
1515
$kini = NULL;
1616
checkCount(0);

Examples/test-suite/php/li_std_auto_ptr_runme.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function checkCount($expected_count) {
1010
# Test raw pointer handling involving virtual inheritance
1111
$kini = new KlassInheritance("KlassInheritanceInput");
1212
checkCount(1);
13-
$s = takeKlassAutoPtr($kini);
13+
$s = useKlassRawPtr($kini);
1414
check::equal($s, "KlassInheritanceInput", "Incorrect string: $s");
1515
$kini = NULL;
1616
checkCount(0);

Examples/test-suite/python/cpp11_std_unique_ptr_runme.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def checkCount(expected_count):
88
# Test raw pointer handling involving virtual inheritance
99
kini = KlassInheritance("KlassInheritanceInput")
1010
checkCount(1)
11-
s = takeKlassUniquePtr(kini)
11+
s = useKlassRawPtr(kini)
1212
if s != "KlassInheritanceInput":
1313
raise RuntimeError("Incorrect string: " + s)
1414
del kini

Examples/test-suite/python/li_std_auto_ptr_runme.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def checkCount(expected_count):
88
# Test raw pointer handling involving virtual inheritance
99
kini = KlassInheritance("KlassInheritanceInput")
1010
checkCount(1)
11-
s = takeKlassAutoPtr(kini)
11+
s = useKlassRawPtr(kini)
1212
if s != "KlassInheritanceInput":
1313
raise RuntimeError("Incorrect string: " + s)
1414
del kini

Examples/test-suite/ruby/cpp11_std_unique_ptr_runme.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ def checkCount(expected_count)
2121
# Test raw pointer handling involving virtual inheritance
2222
kini = Cpp11_std_unique_ptr::KlassInheritance.new("KlassInheritanceInput")
2323
checkCount(1)
24-
s = Cpp11_std_unique_ptr.takeKlassUniquePtr(kini)
24+
s = Cpp11_std_unique_ptr.useKlassRawPtr(kini)
2525
if (s != "KlassInheritanceInput")
2626
raise RuntimeError, "Incorrect string: " + s
2727
end
28-
kini = nil
28+
# kini = nil
29+
Cpp11_std_unique_ptr.takeKlassUniquePtr(kini) # Ensure object is deleted (can't rely on GC)
2930
checkCount(0)
3031

3132

Examples/test-suite/ruby/li_std_auto_ptr_runme.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ def checkCount(expected_count)
2121
# Test raw pointer handling involving virtual inheritance
2222
kini = Li_std_auto_ptr::KlassInheritance.new("KlassInheritanceInput")
2323
checkCount(1)
24-
s = Li_std_auto_ptr.takeKlassAutoPtr(kini)
24+
s = Li_std_auto_ptr.useKlassRawPtr(kini)
2525
if (s != "KlassInheritanceInput")
2626
raise RuntimeError, "Incorrect string: " + s
2727
end
28-
kini = nil
28+
# kini = nil
29+
Li_std_auto_ptr.takeKlassAutoPtr(kini) # Ensure object is deleted (can't rely on GC)
2930
checkCount(0)
3031

3132

0 commit comments

Comments
 (0)