aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/unaryExpression.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp8
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/unaryExpression.qml b/tests/auto/declarative/qdeclarativeecmascript/data/unaryExpression.qml
new file mode 100644
index 0000000000..0d40bec710
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/unaryExpression.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.0
+
+Item {
+
+ Component.onCompleted:
+++bar
+
+ property int bar: 0
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 492ed739b2..11e33bec1d 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -227,6 +227,7 @@ private slots:
void revision();
void automaticSemicolon();
+ void unaryExpression();
private:
static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
@@ -5050,6 +5051,13 @@ void tst_qdeclarativeecmascript::automaticSemicolon()
QVERIFY(object != 0);
}
+void tst_qdeclarativeecmascript::unaryExpression()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("unaryExpression.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+}
+
// Makes sure that a binding isn't double re-evaluated when it depends on the same variable twice
void tst_qdeclarativeecmascript::doubleEvaluate()
{