summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/seatv5/tst_seatv5.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-08-23 09:25:56 +0200
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-08-27 08:47:23 +0200
commitc744945d9c7e26503272a30827762c8098f21e4c (patch)
treeb126e106170e5951564640a0207a44c34adb0cb3 /tests/auto/client/seatv5/tst_seatv5.cpp
parent7a88090775dd666af318cd715988cfaa02109ff1 (diff)
Client tests: Add touch infrastructure and simple test
This doesn't test much, but adds the infrastructure needed for more thorough tests later on. More or less exactly matches the mocking for wl_keyboard and wl_pointer. Change-Id: I563bb9be7ccaaf0aa83611e84d051cc307455ccb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/client/seatv5/tst_seatv5.cpp')
-rw-r--r--tests/auto/client/seatv5/tst_seatv5.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/auto/client/seatv5/tst_seatv5.cpp b/tests/auto/client/seatv5/tst_seatv5.cpp
index 4e5d6ccec..c2b1b0e4b 100644
--- a/tests/auto/client/seatv5/tst_seatv5.cpp
+++ b/tests/auto/client/seatv5/tst_seatv5.cpp
@@ -41,7 +41,7 @@ public:
removeAll<Seat>();
- uint capabilities = MockCompositor::Seat::capability_pointer;
+ uint capabilities = MockCompositor::Seat::capability_pointer | MockCompositor::Seat::capability_touch;
int version = 5;
add<Seat>(capabilities, version);
});
@@ -54,6 +54,8 @@ class tst_seatv5 : public QObject, private SeatV5Compositor
private slots:
void cleanup() { QTRY_VERIFY2(isClean(), qPrintable(dirtyMessage())); }
void bindsToSeat();
+
+ // Pointer tests
void createsPointer();
void setsCursorOnEnter();
void usesEnterSerial();
@@ -62,6 +64,9 @@ private slots:
void fingerScroll();
void fingerScrollSlow();
void wheelDiscreteScroll();
+
+ // Touch tests
+ void createsTouch();
};
void tst_seatv5::bindsToSeat()
@@ -376,5 +381,11 @@ void tst_seatv5::wheelDiscreteScroll()
}
}
+void tst_seatv5::createsTouch()
+{
+ QCOMPOSITOR_TRY_COMPARE(touch()->resourceMap().size(), 1);
+ QCOMPOSITOR_TRY_COMPARE(touch()->resourceMap().first()->version(), 5);
+}
+
QCOMPOSITOR_TEST_MAIN(tst_seatv5)
#include "tst_seatv5.moc"