From b530ca770f54165cd2766ccebb7269ba45bccb51 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Thu, 7 Jan 2016 09:03:09 +0100 Subject: tst_qtextcocumentlayout::blockVisibility - make the test more robust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') 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(); -- cgit v1.2.3