new test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4697 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
14d27cfd0a
commit
c1fa05651a
2 changed files with 15 additions and 0 deletions
|
|
@ -267,6 +267,7 @@ C_TEST_CASES += \
|
|||
preproc_3 \
|
||||
preproc_4 \
|
||||
preproc_5 \
|
||||
preproc_6 \
|
||||
ret_by_value \
|
||||
sizeof_pointer \
|
||||
sneaky1 \
|
||||
|
|
|
|||
14
Examples/test-suite/preproc_6.i
Normal file
14
Examples/test-suite/preproc_6.i
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
%module preproc_6
|
||||
|
||||
#define add(a, b) (a + b)
|
||||
#define times(a, b) (a * b)
|
||||
#define op(x) x(1, 5)
|
||||
|
||||
/* expand to (1 + 5) */
|
||||
%constant int a = op(add);
|
||||
/* expand to (1 * 5) */
|
||||
%constant int b = op(times);
|
||||
/* expand to ((1 + 5) * 5) */
|
||||
%constant int c = times(add(1, 5), 5);
|
||||
/* expand to ((1 + 5) * 5) */
|
||||
%constant int d = times(op(add), 5);
|
||||
Loading…
Add table
Add a link
Reference in a new issue