Tests synchronized with the boost python PySide.
This commit is contained in:
parent
84282e06ac
commit
3deada6b7e
14 changed files with 329 additions and 8 deletions
20
tests/qtcore/qlinef_test.py
Normal file
20
tests/qtcore/qlinef_test.py
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue