const enum SWIGTYPE & typemap tests
more enum tests git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6781 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b3ddf4de72
commit
ea2a3a3925
4 changed files with 47 additions and 15 deletions
|
|
@ -1,12 +1,19 @@
|
|||
/* Test whether anonymous enums are supported well. */
|
||||
/* Test whether varios enums in C. */
|
||||
|
||||
%module "enums"
|
||||
|
||||
// Suppress warning messages from the Ruby module for all of the following...
|
||||
%warnfilter(801) boo;
|
||||
%warnfilter(801) hoo;
|
||||
%warnfilter(801) globalinstance1;
|
||||
%warnfilter(801) globalinstance2;
|
||||
%warnfilter(801) globalinstance3;
|
||||
|
||||
%inline %{
|
||||
|
||||
typedef enum {
|
||||
CSP_ITERATION_FWD,
|
||||
CSP_ITERATION_BWD
|
||||
CSP_ITERATION_BWD = 11
|
||||
} foo1;
|
||||
|
||||
typedef enum foo2 {
|
||||
|
|
@ -23,5 +30,12 @@ bar2(enum foo2 x) {}
|
|||
void
|
||||
bar3(foo3 x) {}
|
||||
|
||||
enum sad { boo, hoo = 5 };
|
||||
|
||||
// Unnamed enum instance
|
||||
enum { globalinstance1, globalinstance2, globalinstance3 = 30 } GlobalInstance;
|
||||
|
||||
// Anonymous enum
|
||||
enum { AnonEnum1, AnonEnum2 = 100 };
|
||||
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue