New test case integers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8815 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a5c2491f6a
commit
ca7f3bf836
5 changed files with 68 additions and 0 deletions
20
Examples/test-suite/integers.i
Normal file
20
Examples/test-suite/integers.i
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* This test case is meant to be used with run tests that check that
|
||||
-- the whole range of the integer types is supported;
|
||||
-- errors are signalled when out-of-range values are passed.
|
||||
*/
|
||||
|
||||
%module integers;
|
||||
|
||||
%inline %{
|
||||
signed char signed_char_identity(signed char x) { return x; }
|
||||
unsigned char unsigned_char_identity(unsigned char x) { return x; }
|
||||
signed short signed_short_identity(signed short x) { return x; }
|
||||
unsigned short unsigned_short_identity(unsigned short x) { return x; }
|
||||
signed int signed_int_identity(signed int x) { return x; }
|
||||
unsigned int unsigned_int_identity(unsigned int x) { return x; }
|
||||
signed long signed_long_identity(signed long x) { return x; }
|
||||
unsigned long unsigned_long_identity(unsigned long x) { return x; }
|
||||
signed long long signed_long_long_identity(signed long long x) { return x; }
|
||||
unsigned long long unsigned_long_long_identity(unsigned long long x) { return x; }
|
||||
%}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue