From 52900dc2d67ad982ecca0d0c64afacc35a791001 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 10 Jun 2022 11:20:40 +0100 Subject: [PATCH] [wayland] Fix surface unit test Behaviour was fixed in c3f5f8ce0155d4e691da759f197cb866baa9ac20. 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! --- src/wayland/autotests/client/test_wayland_surface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/autotests/client/test_wayland_surface.cpp b/src/wayland/autotests/client/test_wayland_surface.cpp index b1bc85550c..217f96048e 100644 --- a/src/wayland/autotests/client/test_wayland_surface.cpp +++ b/src/wayland/autotests/client/test_wayland_surface.cpp @@ -874,9 +874,9 @@ void TestWaylandSurface::testSurfaceAt() // now the surface is mapped and surfaceAt should give the surface QVERIFY(serverSurface->isMapped()); 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))); }