aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/libsample/protected.h3
-rw-r--r--tests/samplebinding/protected_test.py6
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/libsample/protected.h b/tests/libsample/protected.h
index 645dd93e9..1dc628d84 100644
--- a/tests/libsample/protected.h
+++ b/tests/libsample/protected.h
@@ -27,6 +27,7 @@
#include "objecttype.h"
#include "point.h"
#include <string>
+#include <list>
class ProtectedNonPolymorphic
{
@@ -128,6 +129,7 @@ public:
{}
protected:
int protectedProperty;
+ std::list<int> protectedContainerProperty;
Event::EventType protectedEnumProperty;
Point protectedValueTypeProperty;
Point* protectedValueTypePointerProperty;
@@ -135,4 +137,3 @@ protected:
};
#endif // PROTECTED_H
-
diff --git a/tests/samplebinding/protected_test.py b/tests/samplebinding/protected_test.py
index 8ebc99f11..83922d5d1 100644
--- a/tests/samplebinding/protected_test.py
+++ b/tests/samplebinding/protected_test.py
@@ -277,6 +277,12 @@ class ProtectedPropertyTest(unittest.TestCase):
self.obj.protectedProperty = 3
self.assertEqual(self.obj.protectedProperty, 3)
+ def testProtectedContainerProperty(self):
+ '''Writes and reads a protected list of integers property.'''
+ lst = [1, 2, 3, 4]
+ self.obj.protectedContainerProperty = lst
+ self.assertEqual(self.obj.protectedContainerProperty, lst)
+
def testProtectedEnumProperty(self):
'''Writes and reads a protected enum property.'''
self.obj.protectedEnumProperty = Event.SOME_EVENT