From ecdeaa436929e7fe8ebf6063bfb83ba2c4e9383a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 4 Mar 2014 15:17:32 +0100 Subject: [PATCH] tst_QEvent: add another test-case for registerEventType() A test for a hint > QEvent::MaxUser was missing. Added. Change-Id: I00c1c45f6673f35d4203df15b4ffc35f57273e46 Reviewed-by: Friedemann Kleint Reviewed-by: Thiago Macieira --- tests/auto/gui/kernel/qevent/tst_qevent.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/gui/kernel/qevent/tst_qevent.cpp b/tests/auto/gui/kernel/qevent/tst_qevent.cpp index 3865eb00da..46025e444d 100644 --- a/tests/auto/gui/kernel/qevent/tst_qevent.cpp +++ b/tests/auto/gui/kernel/qevent/tst_qevent.cpp @@ -72,8 +72,10 @@ void tst_QEvent::registerEventType_data() QTest::newRow("default") << -1 << int(QEvent::MaxUser); // hint not valid QTest::newRow("User-1") << int(QEvent::User - 1) << int(QEvent::MaxUser - 1); + // hint not valid II + QTest::newRow("MaxUser+1") << int(QEvent::MaxUser + 1) << int(QEvent::MaxUser - 2); // hint valid, but already taken - QTest::newRow("MaxUser-1") << int(QEvent::MaxUser - 1) << int(QEvent::MaxUser - 2); + QTest::newRow("MaxUser-1") << int(QEvent::MaxUser - 1) << int(QEvent::MaxUser - 3); // hint valid, but not taken QTest::newRow("User + 1000") << int(QEvent::User + 1000) << int(QEvent::User + 1000); }