diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-02-23 00:50:58 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-02-23 00:50:58 (GMT) |
commit | a2c998ecdabda8635151d0dcd29ba69354ab20ec (patch) | |
tree | 23457a257f1bcbc8c16986590bfec1c5c52e1b5a | |
parent | 01498eb9a44f3b15e517e81b309087fbbf1b93bf (diff) | |
download | Qt-a2c998ecdabda8635151d0dcd29ba69354ab20ec.zip Qt-a2c998ecdabda8635151d0dcd29ba69354ab20ec.tar.gz Qt-a2c998ecdabda8635151d0dcd29ba69354ab20ec.tar.bz2 |
Test bug QTBUG-5974
-rw-r--r-- | tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp b/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp index e70c7f1..8513a3b 100644 --- a/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp +++ b/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp @@ -249,6 +249,10 @@ void tst_QmlListModel::static_types_data() QTest::newRow("bool") << "ListElement { foo: true }" << QVariant(true); + + QTest::newRow("enum") + << "ListElement { foo: Text.AlignHCenter }" + << QVariant("QTBUG-5974:ListElement: constant script support for property value"); } void tst_QmlListModel::static_types() @@ -262,6 +266,10 @@ void tst_QmlListModel::static_types() QmlComponent component(&engine); component.setData(qml.toUtf8(), QUrl::fromLocalFile(QString("dummy.qml"))); + + if (value.toString().startsWith("QTBUG-")) + QEXPECT_FAIL("",value.toString().toLatin1(),Abort); + QVERIFY(!component.isError()); QmlListModel *obj = qobject_cast<QmlListModel*>(component.create()); @@ -301,7 +309,7 @@ void tst_QmlListModel::error_data() QTest::newRow("bindings not allowed in ListElement") << "import Qt 4.6\nRectangle { id: rect; ListModel { ListElement { foo: rect.color } } }" - << "ListElement: cannot use script for property value"; + << "ListElement: cannot use script for property value"; // but note QTBUG-5974 QTest::newRow("random object list properties allowed in ListElement") << "import Qt 4.6\nListModel { ListElement { foo: [ ListElement { bar: 123 } ] } }" |