diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmlparser/tst_qqmlparser.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp index ce9d0ac894..c2c73935c0 100644 --- a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp +++ b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp @@ -53,6 +53,7 @@ private slots: void stringLiteral(); void noSubstitutionTemplateLiteral(); void templateLiteral(); + void leadingSemicolonInClass(); private: QStringList excludedDirs; @@ -274,6 +275,15 @@ void tst_qqmlparser::templateLiteral() QVERIFY(e); } +void tst_qqmlparser::leadingSemicolonInClass() +{ + QQmlJS::Engine engine; + QQmlJS::Lexer lexer(&engine); + lexer.setCode(QLatin1String("class X{;n(){}}"), 1); + QQmlJS::Parser parser(&engine); + QVERIFY(parser.parseProgram()); +} + QTEST_MAIN(tst_qqmlparser) #include "tst_qqmlparser.moc" |