summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-01-07 09:03:09 +0100
committerTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-01-19 14:48:47 +0000
commitb530ca770f54165cd2766ccebb7269ba45bccb51 (patch)
tree126b4362aa2cc8daa9b5cdbc55f551ba39495841
parent3d82b74c3a2b52ef4239fcb7abd9b54d8cb69805 (diff)
tst_qtextcocumentlayout::blockVisibility - make the test more robust
The test inserts strings "0" ... "9" into the text document, takes the half of resulting document's size, makes half of lines invisible and compares sizes. On OS X 10.11 after inserting "4" the width changes, so making "4" invisible also reduces the width and QCOMPARE(currentSize, previosHalfSize) fails. Instead of digits, insert the same string "A" 10 times. Change-Id: Ie88a0442703f98949cea9bcdb694cecee59695f3 Task-number: QTBUG-49848 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
index f59f542a2b..6a14928219 100644
--- a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
+++ b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
@@ -319,7 +319,7 @@ void tst_QTextDocumentLayout::blockVisibility()
for (int i = 0; i < 10; ++i) {
if (!doc->isEmpty())
cursor.insertBlock();
- cursor.insertText(QString::number(i));
+ cursor.insertText("A");
}
qreal margin = doc->documentMargin();