[pygobject] test_gobject: Add test case for min/max int constants
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] test_gobject: Add test case for min/max int constants
- Date: Sat, 3 Nov 2012 10:58:59 +0000 (UTC)
commit 3354c4eda0f098d1a8f744264ef9a2565a38b50d
Author: Martin Pitt <martinpitt gnome org>
Date: Sat Nov 3 11:58:40 2012 +0100
test_gobject: Add test case for min/max int constants
Related to https://bugzilla.gnome.org/show_bug.cgi?id=685022
tests/test_gobject.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_gobject.py b/tests/test_gobject.py
index e580049..5114611 100644
--- a/tests/test_gobject.py
+++ b/tests/test_gobject.py
@@ -37,6 +37,15 @@ class TestGObjectAPI(unittest.TestCase):
self.assertLess(GObject.PRIORITY_HIGH, GObject.PRIORITY_DEFAULT)
+ def test_min_max_int(self):
+ self.assertEqual(GObject.G_MAXINT32, 2 ** 31 - 1)
+ self.assertEqual(GObject.G_MININT32, -2 ** 31)
+ self.assertEqual(GObject.G_MAXUINT32, 2 ** 32 - 1)
+
+ self.assertEqual(GObject.G_MAXINT64, 2 ** 63 - 1)
+ self.assertEqual(GObject.G_MININT64, -2 ** 63)
+ self.assertEqual(GObject.G_MAXUINT64, 2 ** 64 - 1)
+
class TestReferenceCounting(unittest.TestCase):
def test_regular_object(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]