diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-11-04 23:37:02 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-11-04 23:37:02 (GMT) |
commit | 1409b6cacc743e71830a73a2bf3dcca374106449 (patch) | |
tree | 244dec03c048fbe7dffb05447a0e67d89d6c8e48 | |
parent | 0ced984d3e2cb2a7a1a219ae7a9b09ff4e15a55c (diff) | |
download | Qt-1409b6cacc743e71830a73a2bf3dcca374106449.zip Qt-1409b6cacc743e71830a73a2bf3dcca374106449.tar.gz Qt-1409b6cacc743e71830a73a2bf3dcca374106449.tar.bz2 |
autotests
-rw-r--r-- | tests/auto/declarative/qmlfontloader/tst_qmlfontloader.cpp | 6 | ||||
-rw-r--r-- | tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/declarative/qmlfontloader/tst_qmlfontloader.cpp b/tests/auto/declarative/qmlfontloader/tst_qmlfontloader.cpp index efc86cd..23f7025 100644 --- a/tests/auto/declarative/qmlfontloader/tst_qmlfontloader.cpp +++ b/tests/auto/declarative/qmlfontloader/tst_qmlfontloader.cpp @@ -77,6 +77,7 @@ void tst_qmlfontloader::noFont() QVERIFY(fontObject != 0); QCOMPARE(fontObject->name(), QString("")); + QCOMPARE(fontObject->source(), QUrl("")); QTRY_VERIFY(fontObject->status() == QmlFontLoader::Null); delete fontObject; @@ -89,6 +90,7 @@ void tst_qmlfontloader::namedFont() QmlFontLoader *fontObject = qobject_cast<QmlFontLoader*>(component.create()); QVERIFY(fontObject != 0); + QCOMPARE(fontObject->source(), QUrl("")); QCOMPARE(fontObject->name(), QString("Helvetica")); QTRY_VERIFY(fontObject->status() == QmlFontLoader::Ready); } @@ -100,6 +102,7 @@ void tst_qmlfontloader::localFont() QmlFontLoader *fontObject = qobject_cast<QmlFontLoader*>(component.create()); QVERIFY(fontObject != 0); + QVERIFY(fontObject->source() != QUrl("")); QTRY_COMPARE(fontObject->name(), QString("Fontin")); QTRY_VERIFY(fontObject->status() == QmlFontLoader::Ready); } @@ -111,6 +114,7 @@ void tst_qmlfontloader::failLocalFont() QmlFontLoader *fontObject = qobject_cast<QmlFontLoader*>(component.create()); QVERIFY(fontObject != 0); + QVERIFY(fontObject->source() != QUrl("")); QTRY_COMPARE(fontObject->name(), QString("")); QTRY_VERIFY(fontObject->status() == QmlFontLoader::Error); } @@ -122,6 +126,7 @@ void tst_qmlfontloader::webFont() QmlFontLoader *fontObject = qobject_cast<QmlFontLoader*>(component.create()); QVERIFY(fontObject != 0); + QVERIFY(fontObject->source() != QUrl("")); QTRY_COMPARE(fontObject->name(), QString("Starburst")); QTRY_VERIFY(fontObject->status() == QmlFontLoader::Ready); } @@ -133,6 +138,7 @@ void tst_qmlfontloader::failWebFont() QmlFontLoader *fontObject = qobject_cast<QmlFontLoader*>(component.create()); QVERIFY(fontObject != 0); + QVERIFY(fontObject->source() != QUrl("")); QTRY_COMPARE(fontObject->name(), QString("")); QTRY_VERIFY(fontObject->status() == QmlFontLoader::Error); } diff --git a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp index 3e86cab..c650af2 100644 --- a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp +++ b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp @@ -269,7 +269,7 @@ void tst_qmlgraphicstext::wrap() void tst_qmlgraphicstext::elide() { - for (Qt::TextElideMode m = Qt::ElideLeft; m<=Qt::ElideNone; m=Qt::TextElideMode(int(m)+1)) { + for (QmlGraphicsText::TextElideMode m = QmlGraphicsText::ElideLeft; m<=QmlGraphicsText::ElideNone; m=QmlGraphicsText::TextElideMode(int(m)+1)) { const char* elidename[]={"ElideLeft", "ElideRight", "ElideMiddle", "ElideNone"}; QString elide = "elide: Text." + QString(elidename[int(m)]) + ";"; @@ -279,6 +279,7 @@ void tst_qmlgraphicstext::elide() QmlComponent textComponent(&engine, ("import Qt 4.6\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl("file://")); QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create()); + QCOMPARE(textObject->elideMode(), m); QCOMPARE(textObject->width(), 100.); } @@ -288,6 +289,7 @@ void tst_qmlgraphicstext::elide() QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://")); QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create()); + QCOMPARE(textObject->elideMode(), m); QCOMPARE(textObject->width(), 100.); } @@ -298,6 +300,7 @@ void tst_qmlgraphicstext::elide() QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://")); QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create()); + QCOMPARE(textObject->elideMode(), m); QCOMPARE(textObject->width(), 100.); } } |