From 714ddb6c74b4db4853ca2e34bb50f2888e75ec8d Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Sat, 6 Aug 2011 17:28:00 -0300 Subject: The type checking now pays attention to the tag. An unit test was also added for it. --- tests/samplebinding/modifications_test.py | 5 +++++ tests/samplebinding/typesystem_sample.xml | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'tests/samplebinding') diff --git a/tests/samplebinding/modifications_test.py b/tests/samplebinding/modifications_test.py index b37d74635..344801015 100644 --- a/tests/samplebinding/modifications_test.py +++ b/tests/samplebinding/modifications_test.py @@ -143,5 +143,10 @@ class ModificationsTest(unittest.TestCase): self.assertEqual(self.mods.getSize(ba), len(ba)) self.assertEqual(self.mods.getSize(ba, 20), 20) + def testNoNulPointerTag(self): + point = Point(12, 34) + self.assertEqual(self.mods.sumPointCoordinates(point), 12 + 34) + self.assertRaises(TypeError, self.mods.sumPointCoordinates, None) + if __name__ == '__main__': unittest.main() diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml index add18c289..3e910ccc6 100644 --- a/tests/samplebinding/typesystem_sample.xml +++ b/tests/samplebinding/typesystem_sample.xml @@ -714,6 +714,11 @@ %PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0); + + + + + -- cgit v1.2.3