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)