aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding/enum_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/samplebinding/enum_test.py')
-rwxr-xr-xtests/samplebinding/enum_test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/samplebinding/enum_test.py b/tests/samplebinding/enum_test.py
index 0d4be2293..65ec1af32 100755
--- a/tests/samplebinding/enum_test.py
+++ b/tests/samplebinding/enum_test.py
@@ -66,6 +66,12 @@ class EnumTest(unittest.TestCase):
'''Calling the constructor of non-extensible enum with a string.'''
self.assertRaises(TypeError, SampleNamespace.InValue, '1')
+ def testEnumItemAsDefaultValueToIntArgument(self):
+ '''Calls function with an enum item as default value to an int argument.'''
+ self.assertEqual(SampleNamespace.enumItemAsDefaultValueToIntArgument(), SampleNamespace.ZeroIn)
+ self.assertEqual(SampleNamespace.enumItemAsDefaultValueToIntArgument(SampleNamespace.ZeroOut), SampleNamespace.ZeroOut)
+ self.assertEqual(SampleNamespace.enumItemAsDefaultValueToIntArgument(123), 123)
+
class EnumOverloadTest(unittest.TestCase):
'''Test case for overloads involving enums'''