unsigned long long test added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9433 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e11d78b88e
commit
127e793e99
2 changed files with 23 additions and 2 deletions
|
|
@ -47,4 +47,10 @@
|
||||||
virtual ~Ops() {}
|
virtual ~Ops() {}
|
||||||
virtual operator int() { return 0; }
|
virtual operator int() { return 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Prims {
|
||||||
|
virtual ~Prims() {}
|
||||||
|
virtual unsigned long long ull(unsigned long long i, unsigned long long j) { return i + j; }
|
||||||
|
unsigned long long callull(int i, int j) { return ull(i, j); }
|
||||||
|
};
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,21 @@ public class director_frob_runme
|
||||||
|
|
||||||
String s = foo.abs_method();
|
String s = foo.abs_method();
|
||||||
if (!s.equals("Bravo::abs_method()"))
|
if (!s.equals("Bravo::abs_method()"))
|
||||||
throw new RuntimeException( "error" );
|
throw new RuntimeException( "error" );
|
||||||
|
|
||||||
|
Prims prims = new PrimsDerived();
|
||||||
|
java.math.BigInteger bi = prims.callull(200, 50);
|
||||||
|
java.math.BigInteger biCheck = new java.math.BigInteger("150");
|
||||||
|
if (bi.compareTo(biCheck) != 0)
|
||||||
|
throw new RuntimeException( "failed got:" + bi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class PrimsDerived extends Prims {
|
||||||
|
PrimsDerived() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
public java.math.BigInteger ull(java.math.BigInteger i, java.math.BigInteger j) {
|
||||||
|
return i.subtract(j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue