From 5dc644b362a68879a1aa6a2a09eacbb341a85560 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Wed, 4 Aug 2004 21:31:29 +0000 Subject: New test. * tests/enum.py (EnumTest.testOutofBounds): New test. * gobject/pygflags.c (pyg_flags_from_gtype): * gobject/pygenum.c (pyg_enum_from_gtype): Don't segfault on unknown values. --- tests/enum.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/enum.py') diff --git a/tests/enum.py b/tests/enum.py index 98dbd89..5e55a90 100644 --- a/tests/enum.py +++ b/tests/enum.py @@ -72,6 +72,9 @@ class EnumTest(unittest.TestCase): assert isinstance(klass.__enum_values__, dict) assert len(klass.__enum_values__) >= 2 + def testOutofBounds(self): + gtk.icon_size_register('fake', 24, 24) + class FlagsTest(unittest.TestCase): def testFlags(self): assert issubclass(gobject.GFlags, int) -- cgit