diff options
Diffstat (limited to 'tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp')
-rw-r--r-- | tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp b/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp index bc0448d767..91f6491493 100644 --- a/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp +++ b/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp @@ -115,6 +115,7 @@ private slots: void mouseDrag(); void treeModel(); void changePreferredHighlight(); + void missingPercent(); private: QSGView *createView(); @@ -1072,6 +1073,17 @@ QList<T*> tst_QSGPathView::findItems(QSGItem *parent, const QString &objectName) return items; } +void tst_QSGPathView::missingPercent() +{ + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/missingPercent.qml")); + QDeclarativePath *obj = qobject_cast<QDeclarativePath*>(c.create()); + QVERIFY(obj); + QCOMPARE(obj->attributeAt("_qfx_percent", 1.0), qreal(1.0)); + delete obj; +} + + QTEST_MAIN(tst_QSGPathView) #include "tst_qsgpathview.moc" |