summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-07-05 04:32:45 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-07-05 04:32:45 (GMT)
commit79572155fa27b69339171cee2c1cd072b1af9026 (patch)
tree6feef9478c7c8c3ea15f5c3538f2f2c65b49c927
parentf1bb6d40588774c18eb4e167def7f0962bf98e64 (diff)
downloadQt-79572155fa27b69339171cee2c1cd072b1af9026.zip
Qt-79572155fa27b69339171cee2c1cd072b1af9026.tar.gz
Qt-79572155fa27b69339171cee2c1cd072b1af9026.tar.bz2
Loosen font-sensitive test.
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index a21630b..b6ca7e5 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -175,7 +175,8 @@ void tst_qdeclarativetextinput::width()
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
- QCOMPARE(textinputObject->width(), qreal(metricWidth) + 1.);//1 for the cursor
+ int delta = abs(int(textinputObject->width()) - metricWidth);
+ QVERIFY(delta <= 3.0); // As best as we can hope for cross-platform.
delete textinputObject;
}