Removing empty error tests - c_default_error
C default arguments are allowed, so migrated the error test to a proper test, as no error or warning is expected.
This commit is contained in:
parent
cbec3239d2
commit
ddd1b38fa2
4 changed files with 20 additions and 4 deletions
14
Examples/test-suite/default_args_c.i
Normal file
14
Examples/test-suite/default_args_c.i
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
%module default_args_c
|
||||
|
||||
/* Default arguments for C code */
|
||||
int foo1(int x = 42 || 3);
|
||||
int foo43(int x = 42 | 3);
|
||||
|
||||
%{
|
||||
int foo1(int x) {
|
||||
return x;
|
||||
}
|
||||
int foo43(int x) {
|
||||
return x;
|
||||
}
|
||||
%}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
%module xxx
|
||||
|
||||
int foo(int x = 42 || 3);
|
||||
|
||||
6
Examples/test-suite/python/default_args_c_runme.py
Normal file
6
Examples/test-suite/python/default_args_c_runme.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import default_args_c
|
||||
|
||||
if default_args_c.foo1() != 1:
|
||||
raise RuntimeError("failed")
|
||||
if default_args_c.foo43() != 43:
|
||||
raise RuntimeError("failed")
|
||||
Loading…
Add table
Add a link
Reference in a new issue