summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-10-20 00:20:19 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-10-20 00:22:26 (GMT)
commita25b49d33f1a4fb3eb9d903f3ce2e7cec08aec43 (patch)
tree32610073743aed203ac8696cff16b86238f5ef1c /tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
parentddc7f627d85436d76f5ca881bd6f16efb8962af5 (diff)
downloadQt-a25b49d33f1a4fb3eb9d903f3ce2e7cec08aec43.zip
Qt-a25b49d33f1a4fb3eb9d903f3ce2e7cec08aec43.tar.gz
Qt-a25b49d33f1a4fb3eb9d903f3ce2e7cec08aec43.tar.bz2
Fix position of synthesized semicolon tokens.
Authored-by: Roberto Raggi Reviewed-by: Aaron Kennedy
Diffstat (limited to 'tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 2aa5e0a..50463b7 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -86,6 +86,9 @@ private slots:
void errors_data();
void errors();
+ void insertedSemicolon_data();
+ void insertedSemicolon();
+
void simpleObject();
void simpleContainer();
void interfaceProperty();
@@ -211,6 +214,31 @@ void tst_qdeclarativelanguage::cleanupTestCase()
QVERIFY(QFile::remove(TEST_FILE(QString::fromUtf8("I18nType\303\201\303\242\303\243\303\244\303\245.qml")).toLocalFile()));
}
+void tst_qdeclarativelanguage::insertedSemicolon_data()
+{
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QString>("errorFile");
+ QTest::addColumn<bool>("create");
+
+ QTest::newRow("insertedSemicolon.1") << "insertedSemicolon.1.qml" << "insertedSemicolon.1.errors.txt" << false;
+}
+
+void tst_qdeclarativelanguage::insertedSemicolon()
+{
+ QFETCH(QString, file);
+ QFETCH(QString, errorFile);
+ QFETCH(bool, create);
+
+ QDeclarativeComponent component(&engine, TEST_FILE(file));
+
+ if(create) {
+ QObject *object = component.create();
+ QVERIFY(object == 0);
+ }
+
+ VERIFY_ERRORS(errorFile.toLatin1().constData());
+}
+
void tst_qdeclarativelanguage::errors_data()
{
QTest::addColumn<QString>("file");