tst_QMovie: extend the test coverage for property bindings
The old tests were not using the test methods from QTestPrivate, so add another test case. Task-number: QTBUG-116346 Pick-to: 6.6 6.5 Change-Id: I291ede26461e79a615630f1decad2ad7549b4dd8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>bb10
parent
2ef65f895b
commit
cdb50edc98
|
|
@ -22,6 +22,7 @@ qt_internal_add_test(tst_qmovie
|
|||
tst_qmovie.cpp
|
||||
LIBRARIES
|
||||
Qt::Gui
|
||||
Qt::TestPrivate
|
||||
TESTDATA ${test_data}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include <QTest>
|
||||
#include <QTestEventLoop>
|
||||
#include <QSignalSpy>
|
||||
#include <QtTest/private/qpropertytesthelper_p.h>
|
||||
|
||||
#include <QIODevice>
|
||||
#ifndef QT_NO_WIDGETS
|
||||
|
|
@ -41,6 +42,7 @@ private slots:
|
|||
#endif
|
||||
void emptyMovie();
|
||||
void bindings();
|
||||
void automatedBindings();
|
||||
};
|
||||
|
||||
// Testing get/set functions
|
||||
|
|
@ -239,5 +241,23 @@ void tst_QMovie::bindings()
|
|||
QCOMPARE(cacheModeObserver, QMovie::CacheAll);
|
||||
}
|
||||
|
||||
void tst_QMovie::automatedBindings()
|
||||
{
|
||||
QMovie movie;
|
||||
|
||||
QTestPrivate::testReadWritePropertyBasics(movie, 50, 100, "speed");
|
||||
if (QTest::currentTestFailed()) {
|
||||
qDebug("Failed property test for QMovie::speed");
|
||||
return;
|
||||
}
|
||||
|
||||
QTestPrivate::testReadWritePropertyBasics(movie, QMovie::CacheAll, QMovie::CacheNone,
|
||||
"cacheMode");
|
||||
if (QTest::currentTestFailed()) {
|
||||
qDebug("Failed property test for QMovie::cacheMode");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QMovie)
|
||||
#include "tst_qmovie.moc"
|
||||
|
|
|
|||
Loading…
Reference in New Issue