mirror of https://github.com/swig/swig
Add tests for binary integer literal constants
This commit is contained in:
parent
1bfe88eeda
commit
c759da250f
|
@ -10,4 +10,8 @@ int b2 = 0b10;
|
|||
long b3 = 0b11l;
|
||||
unsigned long b4 = 0b100ul;
|
||||
unsigned long b5 = 0B101UL;
|
||||
#define b6 0b110
|
||||
const int b7 = 0b111;
|
||||
%}
|
||||
|
||||
%constant int b8 = 0b1000;
|
||||
|
|
|
@ -14,3 +14,12 @@ if cvar.b4 != 4:
|
|||
|
||||
if cvar.b5 != 5:
|
||||
raise RuntimeError
|
||||
|
||||
if b6 != 6:
|
||||
raise RuntimeError
|
||||
|
||||
if b7 != 7:
|
||||
raise RuntimeError
|
||||
|
||||
if b8 != 8:
|
||||
raise RuntimeError
|
||||
|
|
Loading…
Reference in New Issue