aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-10-28 17:56:24 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:18:32 -0300
commit9584b5a7c220e74c5181d6117f1833ac835cfb21 (patch)
tree907df22f984279438ec21bc6c46651d356dbbc8f /tests/samplebinding
parent180d72b79e530810b0f6d9c63dfa02c4fba383e8 (diff)
Container types now register their converters by name.
Added unit tests that query for the container types using their C++ signatures.
Diffstat (limited to 'tests/samplebinding')
-rw-r--r--tests/samplebinding/typeconverters_test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/samplebinding/typeconverters_test.py b/tests/samplebinding/typeconverters_test.py
index e08bbd5f3..5191adf8f 100644
--- a/tests/samplebinding/typeconverters_test.py
+++ b/tests/samplebinding/typeconverters_test.py
@@ -64,6 +64,18 @@ class GetPythonTypeByNameTest(unittest.TestCase):
pyTypedef = sample.getPythonType('real')
self.assertEqual(pyType, pyTypedef)
+ def testPairContainerType(self):
+ pyType = sample.getPythonType('std::pair<Complex, int >')
+ self.assertEqual(pyType, list)
+
+ def testListContainerType(self):
+ pyType = sample.getPythonType('std::list<int >')
+ self.assertEqual(pyType, list)
+
+ def testMapContainerType(self):
+ pyType = sample.getPythonType('std::map<std::string, int >')
+ self.assertEqual(pyType, dict)
+
if __name__ == '__main__':
unittest.main()