summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-04 06:15:58 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-04 06:15:58 (GMT)
commit9c817b7a6959a7c8bade12de71d3629fae9b5859 (patch)
treef62a5d7d1f8c7d75a211c265c83b25f49e5aa4f6 /tests
parentcc06fb21f890613c396936561501737a23d1cd9f (diff)
downloadQt-9c817b7a6959a7c8bade12de71d3629fae9b5859.zip
Qt-9c817b7a6959a7c8bade12de71d3629fae9b5859.tar.gz
Qt-9c817b7a6959a7c8bade12de71d3629fae9b5859.tar.bz2
Fix test.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
index 3e86cab..fc47d41 100644
--- a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
+++ b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
@@ -198,6 +198,8 @@ void tst_qmlgraphicstext::width()
for (int i = 0; i < standard.size(); i++)
{
+ QVERIFY(!Qt::mightBeRichText(standard.at(i))); // self-test
+
QFont f;
QFontMetrics fm(f);
int metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width();
@@ -208,11 +210,13 @@ void tst_qmlgraphicstext::width()
QVERIFY(textObject != 0);
QCOMPARE(textObject->width(), qreal(metricWidth));
- QVERIFY(textObject->textFormat() == QmlGraphicsText::PlainText);
+ QVERIFY(textObject->textFormat() == QmlGraphicsText::AutoText); // setting text doesn't change format
}
for (int i = 0; i < richText.size(); i++)
{
+ QVERIFY(Qt::mightBeRichText(richText.at(i))); // self-test
+
QTextDocument document;
document.setHtml(richText.at(i));
document.setDocumentMargin(0);
@@ -225,7 +229,7 @@ void tst_qmlgraphicstext::width()
QVERIFY(textObject != 0);
QCOMPARE(textObject->width(), qreal(documentWidth));
- QVERIFY(textObject->textFormat() == QmlGraphicsText::RichText);
+ QVERIFY(textObject->textFormat() == QmlGraphicsText::AutoText); // setting text doesn't change format
}
}