From ae01354638ec4ec4b723812fd05a5a155a971549 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 21 Oct 2022 17:03:59 +0300 Subject: [PATCH] autotests: Remove invalid cases in testScreens The Workspace requires at least one output and no output has 0x0 size. This fixes a crash in confineToBoundingBox() where qBound() asserts that the min value is less than the max value, in our case the x coordinate of the left edge of the workspace is less than the x coordinate of the right edge of the workspace. --- autotests/integration/screens_test.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/autotests/integration/screens_test.cpp b/autotests/integration/screens_test.cpp index fd6962fb8b..bda6400421 100644 --- a/autotests/integration/screens_test.cpp +++ b/autotests/integration/screens_test.cpp @@ -117,7 +117,6 @@ void ScreensTest::testCurrentWithFollowsMouse_data() QTest::addColumn("cursorPos"); QTest::addColumn("expectedId"); - QTest::newRow("empty") << QVector{{QRect()}} << QPoint(100, 100) << 0; QTest::newRow("cloned") << QVector{{QRect{0, 0, 200, 100}, QRect{0, 0, 200, 100}}} << QPoint(50, 50) << 0; QTest::newRow("adjacent-0") << QVector{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(199, 99) << 0; QTest::newRow("adjacent-1") << QVector{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(200, 100) << 1; @@ -150,7 +149,6 @@ void ScreensTest::testCurrentPoint_data() QTest::addColumn("cursorPos"); QTest::addColumn("expectedId"); - QTest::newRow("empty") << QVector{{QRect()}} << QPoint(100, 100) << 0; QTest::newRow("cloned") << QVector{{QRect{0, 0, 200, 100}, QRect{0, 0, 200, 100}}} << QPoint(50, 50) << 0; QTest::newRow("adjacent-0") << QVector{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(199, 99) << 0; QTest::newRow("adjacent-1") << QVector{{QRect{0, 0, 200, 100}, QRect{200, 100, 400, 300}}} << QPoint(200, 100) << 1;