test virtual operators
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9357 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d5d8f1a3ee
commit
eae32a8da7
3 changed files with 52 additions and 4 deletions
|
|
@ -31,7 +31,16 @@ public class runme
|
|||
if (op.i != 99) throw new Exception("operator-- prefix failed (op)");
|
||||
if (opNew.i != 99) throw new Exception("operator-- prefix failed (opNew)");
|
||||
}
|
||||
|
||||
// overloaded operator class
|
||||
Op k = new OpDerived(3);
|
||||
int check_k = k.IntCast();
|
||||
Assert(check_k == 6);
|
||||
}
|
||||
|
||||
public static void Assert(bool b) {
|
||||
if (!b)
|
||||
throw new Exception("Assertion failed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue