summaryrefslogtreecommitdiff
path: root/tests/glibext/objhole.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/glibext/objhole.py')
-rw-r--r--tests/glibext/objhole.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/glibext/objhole.py b/tests/glibext/objhole.py
new file mode 100644
index 0000000..6a7c2e8
--- /dev/null
+++ b/tests/glibext/objhole.py
@@ -0,0 +1,31 @@
+
+from chrysacase import ChrysalideTestCase
+from pychrysalide.glibext import ThickObject
+
+
+class TestWorks(ChrysalideTestCase):
+ """TestCase for pychrysalide.glibext.BinaryPortion"""
+
+ def testExtraAccess(self):
+ """Access to various definitions of the extra data for ThickObject."""
+
+ obj = ThickObject()
+
+ self.assertEqual(obj.extra, 0)
+
+ obj.extra = 0xffffffe0
+
+ self.assertEqual(obj.extra, 0xffffffe0)
+
+ obj.extra = 0x00123000
+
+ self.assertEqual(obj.extra, 0x00123000)
+
+
+ def testRservedBits(self):
+ """Check space leaved as available by the GLib."""
+
+ obj = ThickObject()
+
+ self.assertTrue(obj._GOBJECT_RESERVED_EXTRA_BITS > 0)
+ self.assertTrue(obj._GOBJECT_RESERVED_EXTRA_BITS < 32)