Skip to content
Permalink
Browse files

Add unit tests for QgsRectangle::contains( double, double)

  • Loading branch information
nyalldawson committed Mar 11, 2021
1 parent ef214d5 commit 581d9af4ba59c017003c3270c80dca8bb754efe8
Showing with 7 additions and 0 deletions.
  1. +7 −0 tests/src/python/test_qgsrectangle.py
@@ -67,12 +67,19 @@ def testContains(self):

# test for point
self.assertTrue(rect1.contains(pnt1))
self.assertTrue(rect1.contains(pnt1.x(), pnt1.y()))
self.assertTrue(rect2.contains(pnt1))
self.assertTrue(rect2.contains(pnt1.x(), pnt1.y()))
self.assertTrue(rect3.contains(pnt1))
self.assertTrue(rect3.contains(pnt1.x(), pnt1.y()))
self.assertFalse(rect1.contains(pnt2))
self.assertFalse(rect1.contains(pnt2.x(), pnt2.y()))
self.assertTrue(rect2.contains(pnt2))
self.assertTrue(rect2.contains(pnt2.x(), pnt2.y()))
self.assertFalse(rect3.contains(pnt2))
self.assertFalse(rect3.contains(pnt2.x(), pnt2.y()))
self.assertTrue(rect3.contains(pnt1))
self.assertTrue(rect3.contains(pnt1.x(), pnt1.y()))

def testUnion(self):
rect1 = QgsRectangle(0.0, 0.0, 5.0, 5.0)

0 comments on commit 581d9af

Please sign in to comment.