Java/C# - test extra constructor to handle enum items initialised by another enum item for %javaconst(1)/%csconst(1)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7868 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3734f71ede
commit
79d343470c
8 changed files with 79 additions and 0 deletions
|
|
@ -369,6 +369,14 @@ public class enum_thorough_runme {
|
|||
i.setMemberInstance(Instances.memberinstance3);
|
||||
if (i.getMemberInstance() != Instances.memberinstance3) throw new RuntimeException("MemberInstance 1 failed");
|
||||
}
|
||||
{
|
||||
if (enum_thorough.repeatTest(repeat.one).swigValue() != 1) throw new RuntimeException("repeatTest 1 failed");
|
||||
if (enum_thorough.repeatTest(repeat.initial).swigValue() != 1) throw new RuntimeException("repeatTest 2 failed");
|
||||
if (enum_thorough.repeatTest(repeat.two).swigValue() != 2) throw new RuntimeException("repeatTest 3 failed");
|
||||
if (enum_thorough.repeatTest(repeat.three).swigValue() != 3) throw new RuntimeException("repeatTest 4 failed");
|
||||
if (enum_thorough.repeatTest(repeat.last).swigValue() != 3) throw new RuntimeException("repeatTest 5 failed");
|
||||
if (enum_thorough.repeatTest(repeat.end).swigValue() != 3) throw new RuntimeException("repeatTest 6 failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue