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
|
|
@ -93,17 +93,14 @@ void main() {
|
|||
throw new Exception("wrong object label");
|
||||
|
||||
Klass k2 = makeKlassUniquePtr("second");
|
||||
if (Klass.getTotal_count() != 2)
|
||||
throw new Exception("number of objects should be 2");
|
||||
checkCount(2);
|
||||
|
||||
k1.dispose();
|
||||
if (Klass.getTotal_count() != 1)
|
||||
throw new Exception("number of objects should be 1");
|
||||
checkCount(1);
|
||||
|
||||
if (k2.getLabel() != "second")
|
||||
throw new Exception("wrong object label");
|
||||
|
||||
k2.dispose();
|
||||
if (Klass.getTotal_count() != 0)
|
||||
throw new Exception("no objects should be left");
|
||||
checkCount(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue