mirror of https://github.com/swig/swig
Add regression test for << in array size bug
Go is happy with the testcase if the type is changed from int to char, so just go with that. See https://sourceforge.net/p/swig/bugs/983/
This commit is contained in:
parent
c538bd24c4
commit
3275331886
|
@ -73,4 +73,8 @@ typedef struct {
|
||||||
cartPosition_t p;
|
cartPosition_t p;
|
||||||
} CartPoseData_t;
|
} CartPoseData_t;
|
||||||
|
|
||||||
|
/* Test left shift in array size doesn't trigger "Bad template type" error.
|
||||||
|
* Regression test for https://sourceforge.net/p/swig/bugs/983/ */
|
||||||
|
char array_shifted_size[(1<<2)];
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -4,7 +4,7 @@ require "tests.php";
|
||||||
|
|
||||||
check::functions(array('fn_taking_arrays','newintpointer','setintfrompointer','getintfrompointer','array_pointer_func'));
|
check::functions(array('fn_taking_arrays','newintpointer','setintfrompointer','getintfrompointer','array_pointer_func'));
|
||||||
check::classes(array('arrays','SimpleStruct','ArrayStruct','CartPoseData_t'));
|
check::classes(array('arrays','SimpleStruct','ArrayStruct','CartPoseData_t'));
|
||||||
check::globals(array());
|
check::globals(array('array_shifted_size'));
|
||||||
|
|
||||||
$ss=new simplestruct();
|
$ss=new simplestruct();
|
||||||
check::classname('simplestruct',$ss);
|
check::classname('simplestruct',$ss);
|
||||||
|
|
Loading…
Reference in New Issue