aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-11-01 18:37:57 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:18:32 -0300
commitf7412abd308626809d7acb348d36ac905bd4c519 (patch)
treebd57d89cfc5ff7ab6ff5ffc02df9ab3bd4293b7d /tests/samplebinding
parent249b15aa297663da2def92c817298e9c543777a4 (diff)
Register enum converters by name.
Also added unit tests.
Diffstat (limited to 'tests/samplebinding')
-rw-r--r--tests/samplebinding/typeconverters_test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/samplebinding/typeconverters_test.py b/tests/samplebinding/typeconverters_test.py
index 5a3f1d350..4261030a6 100644
--- a/tests/samplebinding/typeconverters_test.py
+++ b/tests/samplebinding/typeconverters_test.py
@@ -76,6 +76,14 @@ class GetPythonTypeByNameTest(unittest.TestCase):
pyType = sample.getPythonType('std::map<std::string, int >')
self.assertEqual(pyType, dict)
+ def testGlobalEnumType(self):
+ pyType = sample.getPythonType('GlobalEnum')
+ self.assertEqual(pyType, sample.GlobalEnum)
+
+ def testScopedEnumType(self):
+ pyType = sample.getPythonType('Abstract::Type')
+ self.assertEqual(pyType, sample.Abstract.Type)
+
class CheckValueAndObjectTypeByNameTest(unittest.TestCase):