diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2018-10-11 11:21:11 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2018-10-12 09:46:49 +0000 |
commit | 2755657a7a9bd088086888d7ece22c5121e0c2f4 (patch) | |
tree | 814efe641066c0722af804a461a85d18d500cf1f /tests | |
parent | a3a9940ea24dfcd48ffe71d2ca04cc1201884b2f (diff) |
JS: Check expressions inside template literals for validity
And not use (a possibly invalid result) blindly, because this will cause
assertion failures down the line.
Task-number: QTBUG-71081
Change-Id: Id10149c55026094a355bd747f66014119c0e24f5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/v4misc/tst_v4misc.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qml/v4misc/tst_v4misc.cpp b/tests/auto/qml/v4misc/tst_v4misc.cpp index 21a826850b..a080826e15 100644 --- a/tests/auto/qml/v4misc/tst_v4misc.cpp +++ b/tests/auto/qml/v4misc/tst_v4misc.cpp @@ -110,6 +110,7 @@ void tst_v4misc::parserMisc_data() QTest::addColumn<QString>("error"); QTest::newRow("8[++i][+++i]") << QString("ReferenceError: Prefix ++ operator applied to value that is not a reference."); + QTest::newRow("`a${1++}`") << QString("ReferenceError: Invalid left-hand side expression in postfix operation"); } void tst_v4misc::parserMisc() |