Commit 52900dc2 authored by David Edmundson's avatar David Edmundson
Browse files

[wayland] Fix surface unit test

Behaviour was fixed in c3f5f8ce. If an
item starts at 0,0 and is 100 pixels wide in normal geometry the 100th
pixel is not inside the rectangle.

SubSurface::testSurfaceAt was adjusted correctly but this was missed as
we test the same thing twice!
parent 9419acc1
Pipeline #188598 passed with stage
in 24 minutes and 52 seconds
......@@ -874,9 +874,9 @@ void TestWaylandSurface::testSurfaceAt()
// now the surface is mapped and surfaceAt should give the surface
QCOMPARE(serverSurface->surfaceAt(QPointF(0, 0)), serverSurface);
QCOMPARE(serverSurface->surfaceAt(QPointF(100, 100)), serverSurface);
QCOMPARE(serverSurface->surfaceAt(QPointF(99, 99)), serverSurface);
// outside the geometry it should not give a surface
QVERIFY(!serverSurface->surfaceAt(QPointF(101, 101)));
QVERIFY(!serverSurface->surfaceAt(QPointF(100, 100)));
QVERIFY(!serverSurface->surfaceAt(QPointF(-1, -1)));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment