Test for %javaconstvalue added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6002 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8a7d12435e
commit
e072f9b077
2 changed files with 16 additions and 0 deletions
|
|
@ -25,6 +25,11 @@
|
|||
|
||||
%constant int BRISTOLS=800;
|
||||
|
||||
%javaconstvalue(100L) APPLES;
|
||||
%inline %{
|
||||
#define APPLES 100LL
|
||||
%}
|
||||
|
||||
%javaconst(0);
|
||||
%constant long long ROSY=900LL;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,3 +38,14 @@ enum nonsense { POPPYCOCK, JUNK };
|
|||
nonsense test1(nonsense n) { return n; }
|
||||
enum nonsense test2(enum nonsense n) { return n; }
|
||||
%}
|
||||
|
||||
// Test the %javaconstvalue directive for enums
|
||||
%{
|
||||
static const int FOUR = 4;
|
||||
%}
|
||||
|
||||
%javaconst(1);
|
||||
%javaconstvalue(4) Quattro;
|
||||
%inline %{
|
||||
enum Numero { Quattro = FOUR };
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue