aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding/protected_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/samplebinding/protected_test.py')
-rwxr-xr-xtests/samplebinding/protected_test.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/samplebinding/protected_test.py b/tests/samplebinding/protected_test.py
index fa477c42c..356df1f7c 100755
--- a/tests/samplebinding/protected_test.py
+++ b/tests/samplebinding/protected_test.py
@@ -30,7 +30,7 @@ import unittest
from sample import ProtectedNonPolymorphic, ProtectedVirtualDestructor
from sample import ProtectedPolymorphic, ProtectedPolymorphicDaughter, ProtectedPolymorphicGrandDaughter
-from sample import ProtectedEnumClass
+from sample import ProtectedProperty, ProtectedEnumClass
from sample import PrivateDtor
from sample import Point
@@ -243,6 +243,17 @@ class ProtectedEnumTest(unittest.TestCase):
self.assertEqual(obj.callPublicEnumMethod(ProtectedEnumClass.PublicItem1), ProtectedEnumClass.PublicItem0)
+class ProtectedPropertyTest(unittest.TestCase):
+ '''Test cases for a class with a protected property (or field in C++).'''
+
+ def testProtectedProperty(self):
+ '''Writes and reads a protected property.'''
+ obj = ProtectedProperty()
+
+ obj.protectedProperty = 3
+ self.assertEqual(obj.protectedProperty, 3)
+
+
class PrivateDtorProtectedMethodTest(unittest.TestCase):
'''Test cases for classes with private destructors and protected methods.'''