diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-07-05 04:32:45 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-07-05 04:32:45 (GMT) |
commit | 79572155fa27b69339171cee2c1cd072b1af9026 (patch) | |
tree | 6feef9478c7c8c3ea15f5c3538f2f2c65b49c927 | |
parent | f1bb6d40588774c18eb4e167def7f0962bf98e64 (diff) | |
download | Qt-79572155fa27b69339171cee2c1cd072b1af9026.zip Qt-79572155fa27b69339171cee2c1cd072b1af9026.tar.gz Qt-79572155fa27b69339171cee2c1cd072b1af9026.tar.bz2 |
Loosen font-sensitive test.
-rw-r--r-- | tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 3 |
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; } |