diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-03-23 12:47:33 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-03-23 13:01:04 -0300 |
commit | 26c960fc8e893a4edc655d8548a5ec56f7262bc4 (patch) | |
tree | 8a8ebe14958eb4b5bbb1992ceeab25bcd37438f5 /tests/samplebinding/voidholder_test.py | |
parent | a38c294732542b8d25ca1a34856c2ffa4fa2b1ac (diff) |
Fixes Converter<void*>::toPython method.
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 <anderson.lizardo@openbossa.org>
Reviewed by Bruno Araújo <bruno.araujo@openbossa.org>
Diffstat (limited to 'tests/samplebinding/voidholder_test.py')
-rwxr-xr-x | tests/samplebinding/voidholder_test.py | 6 |
1 files changed, 6 insertions, 0 deletions
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() |