diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-09-23 02:56:29 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-09-23 02:56:29 (GMT) |
commit | 6c98c8b0c8739814d9367d5c29f5c4034ebda0b1 (patch) | |
tree | 7d0079d8f519bc48945cbc8622a99b33ea0450b1 /tests/auto/declarative/qfxtextedit | |
parent | 4594ccff8ee55a5bbc640f764e0767da885a3c9f (diff) | |
download | Qt-6c98c8b0c8739814d9367d5c29f5c4034ebda0b1.zip Qt-6c98c8b0c8739814d9367d5c29f5c4034ebda0b1.tar.gz Qt-6c98c8b0c8739814d9367d5c29f5c4034ebda0b1.tar.bz2 |
QFxTextEdit test passes again
Diffstat (limited to 'tests/auto/declarative/qfxtextedit')
-rw-r--r-- | tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp b/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp index ffbb09b..e38e0e7 100644 --- a/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp +++ b/tests/auto/declarative/qfxtextedit/tst_qfxtextedit.cpp @@ -130,7 +130,7 @@ void tst_qfxtextedit::width() QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create()); QVERIFY(textEditObject != 0); - QCOMPARE(textEditObject->width(), 0.); + QCOMPARE(textEditObject->width(), 1.);//+1 for cursor } for (int i = 0; i < standard.size(); i++) @@ -144,7 +144,7 @@ void tst_qfxtextedit::width() QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create()); QVERIFY(textEditObject != 0); - QCOMPARE(textEditObject->width(), qreal(metricWidth)); + QCOMPARE(textEditObject->width(), qreal(metricWidth + 1 + 3));//+3 is the current way of accounting for space between cursor and last character. } for (int i = 0; i < richText.size(); i++) @@ -160,7 +160,7 @@ void tst_qfxtextedit::width() QFxTextEdit *textEditObject = qobject_cast<QFxTextEdit*>(texteditComponent.create()); QVERIFY(textEditObject != 0); - QCOMPARE(textEditObject->width(), qreal(documentWidth)); + QCOMPARE(textEditObject->width(), qreal(documentWidth + 1 + 3)); } } |