aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/libsample/echo.h2
-rw-r--r--tests/samplebinding/echo_test.py3
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()