Add raw pointer handling test for virtual inheritance
This is a test added for D in previous commit, now expanded to all target languages. Tidy up counting object instances.
This commit is contained in:
parent
910fd1e3cf
commit
d4b1152d4b
20 changed files with 236 additions and 224 deletions
|
|
@ -18,6 +18,16 @@ def checkCount(expected_count)
|
|||
end
|
||||
end
|
||||
|
||||
# Test raw pointer handling involving virtual inheritance
|
||||
kini = Cpp11_std_unique_ptr::KlassInheritance.new("KlassInheritanceInput")
|
||||
checkCount(1)
|
||||
s = Cpp11_std_unique_ptr.takeKlassUniquePtr(kini)
|
||||
if (s != "KlassInheritanceInput")
|
||||
raise RuntimeError, "Incorrect string: " + s
|
||||
end
|
||||
kini = nil
|
||||
checkCount(0)
|
||||
|
||||
|
||||
# unique_ptr as input
|
||||
kin = Cpp11_std_unique_ptr::Klass.new("KlassInput")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue