diff options
Diffstat (limited to 'tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp')
-rw-r--r-- | tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp index d20fe83f2f..62cbc1fa5f 100644 --- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp @@ -274,15 +274,15 @@ void tst_QTextLayout::lineBreaking() QString str = QString::fromUtf8(b->utf8); QTextEngine engine(str, QFont()); const HB_CharAttributes *attrs = engine.attributes(); + QVERIFY(attrs[0].lineBreakType == HB_NoBreak); int i; for (i = 0; i < (int)str.length() - 1; ++i) { QVERIFY(b->breaks[i] != 0xff); - if ( (attrs[i].lineBreakType != HB_NoBreak) != (bool)b->breaks[i] ) { - qDebug("test case \"%s\" failed at char %d; break type: %d", b->utf8, i, attrs[i].lineBreakType); - QCOMPARE( (attrs[i].lineBreakType != HB_NoBreak), (bool)b->breaks[i] ); + if ( (attrs[i + 1].lineBreakType != HB_NoBreak) != (bool)b->breaks[i] ) { + qDebug("test case \"%s\" failed at char %d; break type: %d", b->utf8, i, attrs[i + 1].lineBreakType); + QCOMPARE( (attrs[i + 1].lineBreakType != HB_NoBreak), (bool)b->breaks[i] ); } } - QVERIFY(attrs[i].lineBreakType == HB_ForcedBreak); QCOMPARE(b->breaks[i], (uchar)0xff); ++b; } |