tests.evas: Add a valid, failing test for Rect.intercepts

The algorithm used produces a false negative when the shapes intersect
in a cross shape.
This commit is contained in:
Kai Huuhko 2015-03-02 05:19:04 +02:00
parent f18ddbf87c
commit ee9c3cb042
1 changed files with 4 additions and 0 deletions

View File

@ -149,6 +149,10 @@ class TestRectIntercepts(unittest.TestCase):
r2 = evas.Rect(self.r)
self.assert_(self.r.intercepts(r2))
def testCross(self):
r2 = evas.Rect(2, -2, 6, 14)
self.assert_(self.r.intercepts(r2))
def testInterceptTopLeft(self):
r2 = evas.Rect(-5, -5, 10, 10)
self.assert_(self.r.intercepts(r2))