Tests synchronized with the boost python PySide.

This commit is contained in:
Hugo Lima 2009-12-15 15:37:20 -02:00
commit 3deada6b7e
14 changed files with 329 additions and 8 deletions

View file

@ -0,0 +1,20 @@
#!/usr/bin/python
'''Test cases for QLineF'''
import unittest
import os
from PySide.QtCore import *
class TestQLineF (unittest.TestCase):
def testIntersect(self):
l1 = QLineF(0, 0, 1, 0)
l2 = QLineF(1, -1, 1, 1)
tuple_ = l1.intersect(l2)
self.assertEquals(tuple, tuple_.__class__)
(value, p) = tuple_
self.assertEquals(QLineF.BoundedIntersection, value)
self.assertEqual(QPointF(1, 0), p)
if __name__ == '__main__':
unittest.main()