director base method call tests to check recursive director method problem has gone away
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9277 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ee13e546eb
commit
060dd7f6bd
2 changed files with 203 additions and 0 deletions
|
|
@ -81,6 +81,35 @@ public class director_classic_runme {
|
|||
check(person, "TargetLangOrphanChild");
|
||||
person.delete();
|
||||
}
|
||||
|
||||
// Duals - id() makes an upcall to the base id()
|
||||
{
|
||||
Person person = new TargetLangDualPerson();
|
||||
check(person, "TargetLangDualPerson + Person");
|
||||
person.delete();
|
||||
}
|
||||
{
|
||||
Person person = new TargetLangDualChild();
|
||||
check(person, "TargetLangDualChild + Child");
|
||||
person.delete();
|
||||
}
|
||||
{
|
||||
Person person = new TargetLangDualGrandChild();
|
||||
check(person, "TargetLangDualGrandChild + GrandChild");
|
||||
person.delete();
|
||||
}
|
||||
|
||||
// Mix Orphans and Duals
|
||||
{
|
||||
Person person = new TargetLangDualOrphanPerson();
|
||||
check(person, "TargetLangDualOrphanPerson + Person");
|
||||
person.delete();
|
||||
}
|
||||
{
|
||||
Person person = new TargetLangDualOrphanChild();
|
||||
check(person, "TargetLangDualOrphanChild + Child");
|
||||
person.delete();
|
||||
}
|
||||
}
|
||||
|
||||
static void check(Person person, String expected) {
|
||||
|
|
@ -215,3 +244,75 @@ class TargetLangOrphanChild extends OrphanChild
|
|||
}
|
||||
}
|
||||
|
||||
// Duals - id() makes an upcall to the base id()
|
||||
class TargetLangDualPerson extends Person
|
||||
{
|
||||
public TargetLangDualPerson()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public String id()
|
||||
{
|
||||
String identifier = "TargetLangDualPerson + " + super.id();
|
||||
return identifier;
|
||||
}
|
||||
}
|
||||
|
||||
class TargetLangDualChild extends Child
|
||||
{
|
||||
public TargetLangDualChild()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public String id()
|
||||
{
|
||||
String identifier = "TargetLangDualChild + " + super.id();
|
||||
return identifier;
|
||||
}
|
||||
}
|
||||
|
||||
class TargetLangDualGrandChild extends GrandChild
|
||||
{
|
||||
public TargetLangDualGrandChild()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public String id()
|
||||
{
|
||||
String identifier = "TargetLangDualGrandChild + " + super.id();
|
||||
return identifier;
|
||||
}
|
||||
}
|
||||
|
||||
// Mix Orphans and Duals
|
||||
class TargetLangDualOrphanPerson extends OrphanPerson
|
||||
{
|
||||
public TargetLangDualOrphanPerson()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public String id()
|
||||
{
|
||||
String identifier = "TargetLangDualOrphanPerson + " + super.id();
|
||||
return identifier;
|
||||
}
|
||||
}
|
||||
|
||||
class TargetLangDualOrphanChild extends OrphanChild
|
||||
{
|
||||
public TargetLangDualOrphanChild()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public String id()
|
||||
{
|
||||
String identifier = "TargetLangDualOrphanChild + " + super.id();
|
||||
return identifier;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue