aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-06-02 17:31:05 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:15:25 -0300
commit6dd350021b30739dec375ec90e040d6e2ec63c11 (patch)
treebe9f683d73a234a0692c1c86a8f34f0cce227aec /tests/samplebinding
parent811c7cb53af4134fd419bc31ca3bcb04cfc262b0 (diff)
Test for bug 291 - "Generator ignores inject code for rich comparison operators."
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/samplebinding')
-rw-r--r--tests/samplebinding/typesystem_sample.xml7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 87ee5512f..927483bf5 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -1389,6 +1389,13 @@
%PYARG_0 = PyString_FromString(%1);
</inject-code>
</add-function>
+ <add-function signature="operator>(int)">
+ <inject-code>
+ // This should test if code injections works inside rich comparison operators
+ Py_INCREF(Py_True);
+ %PYARG_0 = Py_True;
+ </inject-code>
+ </add-function>
</value-type>
<value-type name="Color" />