Details
-
Bug
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
dev
-
None
Description
Create a QTest function that do and verify a specified QTest::action. This function should simplify the creation of new tests and make them more reliable in the process.
This function should be somewhat of a universal tool when creating test and therefore must work with any QObject and their various method. One way to implement this could be
with enum flags, telling the function what it should do. For example, if we want to ensure that isVisible(), we first need to do setVisible().
The returned value could also be an enum informing if we timed out, platform no supported, success, fail, and so on...
QTest::ensure(QObject *object, QTest::action, int timeout)
It should replace structure similar to this one:
show(); QTest::ensure(object, isVisible);
QTest::waitfor... ; to instead be
QTRY_VERIFY(... ;