From 26c960fc8e893a4edc655d8548a5ec56f7262bc4 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Tue, 23 Mar 2010 12:47:33 -0300 Subject: Fixes Converter::toPython method. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The void* converter transforms a C++ NULL pointer in a Python None. An unit test for this case was added as well. Reviewed by Anderson Lizardo Reviewed by Bruno Araújo --- tests/samplebinding/voidholder_test.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/samplebinding') diff --git a/tests/samplebinding/voidholder_test.py b/tests/samplebinding/voidholder_test.py index 8d08d1fdf..a6fce2e00 100755 --- a/tests/samplebinding/voidholder_test.py +++ b/tests/samplebinding/voidholder_test.py @@ -45,6 +45,12 @@ class VoidHolderTest(unittest.TestCase): voidholder = VoidHolder(obj) self.assertEquals(obj, voidholder.voidPointer()) + def testGetNoneObjectFromVoidHolder(self): + '''A VoidHolder created without parameters returns a NULL pointer + that should be converted to a Python None.''' + voidholder = VoidHolder() + self.assertEquals(voidholder.voidPointer(), None) + if __name__ == '__main__': unittest.main() -- cgit v1.2.3