From 68dde475dd98b191a6bd3d6151cb7ab5f6410242 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Mon, 11 Apr 2011 16:30:35 -0300 Subject: Fix bug 823 - "Shiboken doesn't support function call overloads" --- tests/libsample/echo.h | 2 ++ tests/samplebinding/echo_test.py | 3 +++ 2 files changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/libsample/echo.h b/tests/libsample/echo.h index cc35ccd1a..92038b1f0 100644 --- a/tests/libsample/echo.h +++ b/tests/libsample/echo.h @@ -37,6 +37,8 @@ public: void doNothingWithConstBool(const bool hi) {} void methodWithNamedArg(const Str& string = Str("")) {} + Str operator()(const Str& s, const int i) { return s + i; } + // These method are here just for compilation test purposes Echo& operator<<(unsigned int item) { return *this; } Echo& operator<<(signed int item) { return *this; } diff --git a/tests/samplebinding/echo_test.py b/tests/samplebinding/echo_test.py index 4f1bbf7c2..80e3fea62 100644 --- a/tests/samplebinding/echo_test.py +++ b/tests/samplebinding/echo_test.py @@ -40,6 +40,9 @@ class TestEcho(unittest.TestCase): y = Echo().echo(x) self.assertEqual(x, y) + def testCallOperator(self): + e = Echo() + self.assertEqual(e("Hello", 3), "Hello3"); if __name__ == '__main__': unittest.main() -- cgit v1.2.3