summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index caf9bd3..b67dc30 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -110,6 +110,7 @@ private slots:
void longText();
void widthOfTabs();
void columnWrapWithTabs();
+ void boundingRectForUnsetLineWidth();
// QTextLine stuff
void setNumColumnsWrapAtWordBoundaryOrAnywhere();
@@ -1307,6 +1308,17 @@ void tst_QTextLayout::columnWrapWithTabs()
}
+void tst_QTextLayout::boundingRectForUnsetLineWidth()
+{
+ QTextLayout layout("FOOBAR");
+
+ layout.beginLayout();
+ QTextLine line = layout.createLine();
+ layout.endLayout();
+
+ QCOMPARE(layout.boundingRect().width(), line.naturalTextWidth());
+}
+
void tst_QTextLayout::lineWidthFromBOM()
{
const QString string(QChar(0xfeff)); // BYTE ORDER MARK