diff --git a/Examples/test-suite/funcptr_cpp.i b/Examples/test-suite/funcptr_cpp.i index 8e05d308d..d8ec8de4d 100644 --- a/Examples/test-suite/funcptr_cpp.i +++ b/Examples/test-suite/funcptr_cpp.i @@ -17,6 +17,7 @@ int call2(int * (*d)(const int &, int), int a, int b) { return *d(a, b); } int call3(int & (*d)(const int &, int), int a, int b) { return d(a, b); } int call4(int & (*d)(int &, int *), int a, int b) { return d(a, &b); } int call5(int & (*d)(int &, int const * const), int a, int b) { return d(a, &b); } +int callconst1(int (* const d)(const int &, int), int a, int b) { return d(a, b); } %} %constant int (*ADD_BY_VALUE)(const int &, int) = addByValue; diff --git a/Examples/test-suite/python/funcptr_cpp_runme.py b/Examples/test-suite/python/funcptr_cpp_runme.py index eb113d226..22c50b4e9 100644 --- a/Examples/test-suite/python/funcptr_cpp_runme.py +++ b/Examples/test-suite/python/funcptr_cpp_runme.py @@ -8,3 +8,6 @@ if call3(ADD_BY_REFERENCE, 14, 15) != 29: raise RuntimeError if call1(ADD_BY_VALUE_C, 2, 3) != 5: raise RuntimeError + +if callconst1(ADD_BY_VALUE_C, 2, 3) != 5: + raise RuntimeError