[pygobject] tests: Add test for pass-by-reference GValue



commit 40a3cd18fd7111ae177f6ab716f78d131f59a1c0
Author: Simon Feltman <sfeltman src gnome org>
Date:   Tue Jul 2 19:20:04 2013 -0700

    tests: Add test for pass-by-reference GValue
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701058

 tests/test_gi.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 8dd0126..f01dbb6 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -1219,6 +1219,13 @@ class TestGValue(unittest.TestCase):
         value = GObject.Value(GObject.TYPE_INT, 42)
         GIMarshallingTests.gvalue_in(value)
 
+    @unittest.skipUnless(hasattr(GIMarshallingTests, 'gvalue_in_with_modification'),
+                         'Newer version of gi needed.')
+    def test_gvalue_in_with_modification(self):
+        value = GObject.Value(GObject.TYPE_INT, 42)
+        GIMarshallingTests.gvalue_in_with_modification(value)
+        self.assertEqual(value.get_int(), 24)
+
     def test_gvalue_int64_in(self):
         value = GObject.Value(GObject.TYPE_INT64, GObject.G_MAXINT64)
         GIMarshallingTests.gvalue_int64_in(value)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]