summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSimon van der Linden <svdlinden@src.gnome.org>2010-01-08 21:10:28 +0100
committerSimon van der Linden <svdlinden@src.gnome.org>2010-01-08 21:10:28 +0100
commitb11cf2595987c1f0fc4ffd834f07c98b92aa2355 (patch)
tree2a9aa42e58d13c6b2bd8f9361fddc87634976347 /tests
parentb4189be2b2d3c350fdf33e27309bee5a72e4f72a (diff)
downloadpygi-b11cf2595987c1f0fc4ffd834f07c98b92aa2355.tar.gz
pygi-b11cf2595987c1f0fc4ffd834f07c98b92aa2355.tar.xz
pygi-b11cf2595987c1f0fc4ffd834f07c98b92aa2355.zip
Initialize struct fields to 0 when allocating
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gi.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 8de9114..2cbb2eb 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -1120,6 +1120,9 @@ class TestStructure(unittest.TestCase):
struct = TestGI.SimpleStruct()
self.assertTrue(isinstance(struct, TestGI.SimpleStruct))
+ self.assertEquals(0, struct.long_)
+ self.assertEquals(0, struct.int8)
+
struct.long_ = 6
struct.int8 = 7
@@ -1252,6 +1255,8 @@ class TestStructure(unittest.TestCase):
struct = TestGI.BoxedStruct()
self.assertTrue(isinstance(struct, TestGI.BoxedStruct))
+ self.assertEquals(0, struct.long_)
+
del struct
def test_boxed_struct_new(self):