aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-04-06 21:25:50 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:07 -0300
commit77be0fc1a7927022347104162b4bd42f0cbb01a8 (patch)
tree21ba54d8df53b25d6089dadd5702e9442764f0f5 /tests
parentf1b3580d577a20a3b317dae42583652248141f6a (diff)
Fixes bugs 739 and 752.
Bug #739 - Method "QTransform::map(qreal x, qreal y, qreal* tx, qreal* ty) const" missing Bug #752 - Method "void QSplitter::getRange(int index, int* min, int* max) const" missing Also added unit tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/CMakeLists.txt2
-rw-r--r--tests/QtGui/qsplitter_test.py16
-rw-r--r--tests/QtGui/qtransform_test.py16
3 files changed, 34 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index ef62638fc..515c2e235 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -95,6 +95,7 @@ PYSIDE_TEST(qpushbutton_test.py)
PYSIDE_TEST(qradialgradient_test.py)
PYSIDE_TEST(qregion_test.py)
PYSIDE_TEST(qshortcut_test.py)
+PYSIDE_TEST(qsplitter_test.py)
PYSIDE_TEST(qstandarditemmodel_test.py)
PYSIDE_TEST(qstring_qkeysequence_test.py)
PYSIDE_TEST(qstyle_test.py)
@@ -104,6 +105,7 @@ PYSIDE_TEST(qtextedit_test.py)
PYSIDE_TEST(qtextedit_signal_test.py)
PYSIDE_TEST(qtoolbar_test.py)
PYSIDE_TEST(qtoolbox_test.py)
+PYSIDE_TEST(qtransform_test.py)
PYSIDE_TEST(qvariant_test.py)
PYSIDE_TEST(qvalidator_test.py)
PYSIDE_TEST(qwidget_setlayout_test.py)
diff --git a/tests/QtGui/qsplitter_test.py b/tests/QtGui/qsplitter_test.py
new file mode 100644
index 000000000..a438b6949
--- /dev/null
+++ b/tests/QtGui/qsplitter_test.py
@@ -0,0 +1,16 @@
+import unittest
+from PySide.QtGui import QSplitter
+
+from helper import UsesQApplication
+
+class QSplitterTest(UsesQApplication):
+
+ def testGetRange(self):
+ splitter = QSplitter()
+ _min, _max = splitter.getRange(0)
+ self.assert_(isinstance(_min, int))
+ self.assert_(isinstance(_max, int))
+
+if __name__ == "__main__":
+ unittest.main()
+
diff --git a/tests/QtGui/qtransform_test.py b/tests/QtGui/qtransform_test.py
new file mode 100644
index 000000000..450bf3292
--- /dev/null
+++ b/tests/QtGui/qtransform_test.py
@@ -0,0 +1,16 @@
+import unittest
+from PySide.QtGui import QTransform
+
+class QTransformTest(unittest.TestCase):
+
+ def testMap(self):
+ transform = QTransform()
+ values = (10.0, 20.0)
+ tx, ty = transform.map(*values)
+ self.assert_(isinstance(tx, float))
+ self.assert_(isinstance(ty, float))
+ self.assertEqual((tx, ty), values)
+
+if __name__ == "__main__":
+ unittest.main()
+