diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-02-23 12:45:14 -0300 |
---|---|---|
committer | Lauro Neto <lauro.neto@openbossa.org> | 2010-02-23 20:10:28 -0300 |
commit | 506a97bad2ab5cf9b09f735a59f9dcea68bbd276 (patch) | |
tree | 8b3a216259607c8f789a68db7163c529daf8e0d3 /tests/samplebinding/enum_test.py | |
parent | 742eba6e0898f08c5ca04c1eb8292fc3d7b60a43 (diff) |
Adding default value for enum/flag constructor
Diffstat (limited to 'tests/samplebinding/enum_test.py')
-rwxr-xr-x | tests/samplebinding/enum_test.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/samplebinding/enum_test.py b/tests/samplebinding/enum_test.py index 53b4a9b3a..a6c2e0421 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) |