summaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
Diffstat (limited to 'tests/samplebinding')
-rw-r--r--tests/samplebinding/overload_sorting_test.py4
-rw-r--r--tests/samplebinding/typesystem_sample.xml8
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/samplebinding/overload_sorting_test.py b/tests/samplebinding/overload_sorting_test.py
index 9d4b1cbe..0cb86642 100644
--- a/tests/samplebinding/overload_sorting_test.py
+++ b/tests/samplebinding/overload_sorting_test.py
@@ -60,6 +60,10 @@ class SimpleOverloadSorting(unittest.TestCase):
'''Passing an implicit convertible object to an overload'''
self.assert_(self.obj.implicit_overload(ImplicitTarget()))
+ def testPyObjectSort(self):
+ self.assertEqual(self.obj.pyObjOverload(1, 2), "int,int")
+ self.assertEqual(self.obj.pyObjOverload(object(), 2), "PyObject,int")
+
class DeepOverloadSorting(unittest.TestCase):
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 2667c16d..63691605 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -992,6 +992,14 @@
return PyString_FromString("PyObject");
</inject-code>
</add-function>
+ <modify-function signature="pyObjOverload(unsigned char*, int)">
+ <modify-argument index="1">
+ <replace-type modified-type="PyObject" />
+ </modify-argument>
+ <inject-code>
+ unsigned char* %1 = 0;
+ </inject-code>
+ </modify-function>
</value-type>
<value-type name="ImplicitTarget"/>