summaryrefslogtreecommitdiffstats
path: root/tests/samplebinding/enum_test.py
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-02-23 12:45:14 -0300
committerLauro Neto <lauro.neto@openbossa.org>2010-02-23 20:10:28 -0300
commit506a97bad2ab5cf9b09f735a59f9dcea68bbd276 (patch)
tree8b3a216259607c8f789a68db7163c529daf8e0d3 /tests/samplebinding/enum_test.py
parent742eba6e0898f08c5ca04c1eb8292fc3d7b60a43 (diff)
downloadshiboken-506a97bad2ab5cf9b09f735a59f9dcea68bbd276.tar.gz
shiboken-506a97bad2ab5cf9b09f735a59f9dcea68bbd276.tar.xz
shiboken-506a97bad2ab5cf9b09f735a59f9dcea68bbd276.zip
Adding default value for enum/flag constructor
Diffstat (limited to 'tests/samplebinding/enum_test.py')
-rwxr-xr-xtests/samplebinding/enum_test.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/samplebinding/enum_test.py b/tests/samplebinding/enum_test.py
index 53b4a9b3..a6c2e042 100755
--- a/tests/samplebinding/enum_test.py
+++ b/tests/samplebinding/enum_test.py
@@ -48,6 +48,11 @@ class EnumTest(unittest.TestCase):
'''Tries to build the proper enum using an integer.'''
SampleNamespace.getNumber(SampleNamespace.Option(1))
+ def testBuildingEnumWithDefaultValue(self):
+ '''Enum constructor with default value'''
+ enum = SampleNamespace.Option()
+ self.assertEqual(enum, SampleNamespace.None)
+
def testEnumConversionToAndFromPython(self):
'''Conversion of enum objects from Python to C++ back again.'''
enumout = SampleNamespace.enumInEnumOut(SampleNamespace.TwoIn)