From 882c98f7a9b3a3fc030cee87235cf8b375cd6b54 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Wed, 29 Dec 2010 18:26:44 -0200 Subject: Add support for operator overload injection. Reviewer: Marcelo Lira Lauro Moura --- tests/samplebinding/objecttypeoperators_test.py | 3 +++ tests/samplebinding/typesystem_sample.xml | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/samplebinding/objecttypeoperators_test.py b/tests/samplebinding/objecttypeoperators_test.py index 148bc3591..71e5a5d40 100644 --- a/tests/samplebinding/objecttypeoperators_test.py +++ b/tests/samplebinding/objecttypeoperators_test.py @@ -47,6 +47,9 @@ class ObjectTypeOperatorsTest(unittest.TestCase): self.assertEqual("a", a) self.assertEqual(a, "a") + def testOperatorInjection(self): + a = ObjectTypeOperators("a") + self.assertNotEqual(a, "b") if __name__ == '__main__': unittest.main() diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml index 576c54656..5a518c34a 100644 --- a/tests/samplebinding/typesystem_sample.xml +++ b/tests/samplebinding/typesystem_sample.xml @@ -1274,7 +1274,13 @@ - + + + + %PYARG_0 = %CONVERTTOPYTHON[bool](%CPPSELF.key() != %1); + + + -- cgit v1.2.3