aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding/return_null_test.py
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2009-09-10 11:01:03 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-09-10 13:55:37 -0300
commitb137437505cf662a899a22ffda9c5b36e68181c3 (patch)
tree2b9ce033f1026dff05166552ea3eb8684642341f /tests/samplebinding/return_null_test.py
parent4466eddf64fbfa5d62c20a6782f99b01369fb47d (diff)
Use Py_RETURN_NONE for functions with null return.
fixes bug #45.
Diffstat (limited to 'tests/samplebinding/return_null_test.py')
-rwxr-xr-xtests/samplebinding/return_null_test.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/samplebinding/return_null_test.py b/tests/samplebinding/return_null_test.py
new file mode 100755
index 000000000..907dd8a57
--- /dev/null
+++ b/tests/samplebinding/return_null_test.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# This file is part of the Shiboken Python Bindings Generator project.
+#
+# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#
+# Contact: PySide team <contact@pyside.org>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public License
+# version 2.1 as published by the Free Software Foundation. Please
+# review the following information to ensure the GNU Lesser General
+# Public License version 2.1 requirements will be met:
+# http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+# #
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+
+'''Test cases for Abstract class'''
+
+import sys
+import unittest
+
+from sample import returnNull
+
+class RetrunTest(unittest.TestCase):
+ '''Test case for functions with null return'''
+
+ def testNull(self):
+ o = returnNull()
+ self.assert_(o == None)
+
+