aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktext/tst_qquicktext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquicktext/tst_qquicktext.cpp')
-rw-r--r--tests/auto/quick/qquicktext/tst_qquicktext.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
index 63e023644f..a9c35e0cc4 100644
--- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
@@ -159,6 +159,8 @@ private slots:
void fontInfo();
+ void initialContentHeight();
+
private:
QStringList standard;
QStringList richText;
@@ -4383,6 +4385,18 @@ void tst_qquicktext::fontInfo()
QVERIFY(copy->font().pixelSize() < 1000);
}
+void tst_qquicktext::initialContentHeight()
+{
+ QQmlComponent component(&engine, testFile("contentHeight.qml"));
+ QVERIFY(component.isReady());
+ QScopedPointer<QObject> object(component.create());
+ QObject *root = object.data();
+ QVERIFY(root);
+ QQuickText *text = qobject_cast<QQuickText *>(root);
+ QVERIFY(text);
+ QCOMPARE(text->height(), text->contentHeight());
+}
+
void tst_qquicktext::implicitSizeChangeRewrap()
{
QScopedPointer<QQuickView> window(new QQuickView);