diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-04-11 16:30:35 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:15:20 -0300 |
commit | 68dde475dd98b191a6bd3d6151cb7ab5f6410242 (patch) | |
tree | e9317023e0b41804efba6c273450dd0929af94a5 /tests | |
parent | e6a322e777ab36bbed430a8836e0f656de49963d (diff) |
Fix bug 823 - "Shiboken doesn't support function call overloads"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libsample/echo.h | 2 | ||||
-rw-r--r-- | tests/samplebinding/echo_test.py | 3 |
2 files changed, 5 insertions, 0 deletions
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() |