summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-10-30 09:08:24 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-10-30 09:08:24 (GMT)
commit8efb1eb4b112dfe718f47a5b99cd9a839ac62752 (patch)
treec19cdce456e2c142033e530e59954ff0b78a6dea /tests/auto
parentdc4e074324eb91a8a16e14c86ff41b03647b4cfa (diff)
parent2f9c37c4b48c4b5005c89f1c5a5fa036e1e22811 (diff)
downloadQt-8efb1eb4b112dfe718f47a5b99cd9a839ac62752.zip
Qt-8efb1eb4b112dfe718f47a5b99cd9a839ac62752.tar.gz
Qt-8efb1eb4b112dfe718f47a5b99cd9a839ac62752.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index fe87dfb..7c3f4f2 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -118,6 +118,7 @@ private slots:
void smallTextLengthWordWrap();
void smallTextLengthWrapAtWordBoundaryOrAnywhere();
void testLineBreakingAllSpaces();
+ void lineWidthFromBOM();
private:
@@ -1306,6 +1307,18 @@ void tst_QTextLayout::columnWrapWithTabs()
}
+void tst_QTextLayout::lineWidthFromBOM()
+{
+ const QString string(QChar(0xfeff)); // BYTE ORDER MARK
+ QTextLayout layout(string);
+ layout.beginLayout();
+ QTextLine line = layout.createLine();
+ line.setLineWidth(INT_MAX / 256);
+ layout.endLayout();
+
+ // Don't spin into an infinite loop
+ }
+
QTEST_MAIN(tst_QTextLayout)
#include "tst_qtextlayout.moc"