From c57c204a63168e875e513d299bb152c0a1ab0094 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 14 Aug 2009 16:56:46 +1000 Subject: Fix MLS test "sm"+ellipsis (...) is same length as "small" in some fonts --- tests/auto/qfontmetrics/tst_qfontmetrics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp index 9a743ef..9ffbc05 100644 --- a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp +++ b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp @@ -218,8 +218,9 @@ void tst_QFontMetrics::elidedMultiLength() QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_short), text1_short); QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_short - 1), text1_small); + // Not even wide enough for "small" - should use ellipsis QChar ellipsisChar(0x2026); - QString text1_el = QString::fromLatin1("sm") + ellipsisChar; + QString text1_el = QString::fromLatin1("s") + ellipsisChar; int width_small = fm.width(text1_el); QCOMPARE(fm.elidedText(text1,Qt::ElideRight, width_small + 1), text1_el); -- cgit v0.12