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:
parent
f18ddbf87c
commit
ee9c3cb042
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue