summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativetext
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-01-31 03:29:05 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-01-31 03:29:05 (GMT)
commit2b337d8cbe8e6646ec78b3acaad50ce108d33dc0 (patch)
tree1e3def69f8767d9667558b96fb450a50125dea70 /tests/auto/declarative/qdeclarativetext
parentbdd425b69ecfa54691c8d2de8f9aeb44e1d9b3e4 (diff)
downloadQt-2b337d8cbe8e6646ec78b3acaad50ce108d33dc0.zip
Qt-2b337d8cbe8e6646ec78b3acaad50ce108d33dc0.tar.gz
Qt-2b337d8cbe8e6646ec78b3acaad50ce108d33dc0.tar.bz2
Add missing versioning tests for new QtQuick 1.1 properties/methods.
Task-number: QTBUG-15489 Reviewed-by: Bea Lam
Diffstat (limited to 'tests/auto/declarative/qdeclarativetext')
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
index 8111cd2..320a6e7 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -470,6 +470,8 @@ void tst_qdeclarativetext::alignments()
QCOMPARE(actual,expect);
}
#endif
+
+ delete canvas;
}
//the alignment tests may be trivial o.oa
@@ -962,6 +964,8 @@ void tst_qdeclarativetext::QTBUG_12291()
QDeclarativeText *text = ob->findChild<QDeclarativeText*>("text");
QVERIFY(text);
QVERIFY(text->boundingRect().isValid());
+
+ delete canvas;
}
class EventSender : public QGraphicsItem
@@ -1054,6 +1058,8 @@ void tst_qdeclarativetext::embeddedImages()
QCOMPARE(textObject->width(), 16.0); // default size of QTextDocument broken image icon
QCOMPARE(textObject->height(), 16.0);
}
+
+ delete textObject;
}
void tst_qdeclarativetext::lineCount()
@@ -1081,6 +1087,8 @@ void tst_qdeclarativetext::lineCount()
QCOMPARE(myText->lineCount(), 2);
QCOMPARE(myText->truncated(), true);
QCOMPARE(myText->maximumLineCount(), 2);
+
+ delete canvas;
}
void tst_qdeclarativetext::lineHeight()
@@ -1112,6 +1120,8 @@ void tst_qdeclarativetext::lineHeight()
myText->setLineHeightMode(QDeclarativeText::PixelHeight);
myText->setLineHeight(10);
QCOMPARE(myText->height(), myText->lineCount() * 10.0);
+
+ delete canvas;
}
void tst_qdeclarativetext::implicitSize_data()
@@ -1175,9 +1185,21 @@ void tst_qdeclarativetext::testQtQuick11Attributes_data()
<< "QDeclarativeComponent: Component is not ready"
<< ":1 \"Text.maximumLineCount\" is not available in QtQuick 1.0.\n";
- QTest::newRow("truncated") << "property int foo: lineCount"
+ QTest::newRow("lineHeight") << "lineHeight: 2"
+ << "QDeclarativeComponent: Component is not ready"
+ << ":1 \"Text.lineHeight\" is not available in QtQuick 1.0.\n";
+
+ QTest::newRow("lineHeightMode") << "lineHeightMode: Text.MultiplyHeight"
+ << "QDeclarativeComponent: Component is not ready"
+ << ":1 \"Text.lineHeightMode\" is not available in QtQuick 1.0.\n";
+
+ QTest::newRow("lineCount") << "property int foo: lineCount"
<< "<Unknown File>:1: ReferenceError: Can't find variable: lineCount"
<< "";
+
+ QTest::newRow("truncated") << "property bool foo: truncated"
+ << "<Unknown File>:1: ReferenceError: Can't find variable: truncated"
+ << "";
}
QTEST_MAIN(tst_qdeclarativetext)