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 <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2014-03-04 15:17:32 +01:00 committed by The Qt Project
parent 396e3a18d7
commit ecdeaa4369

View File

@ -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);
}