From 4b7d56f65dcb29718a0aee33863e7687b1cb6e5f Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sat, 2 Jun 2018 21:58:35 +0200 Subject: Fix some of the finer details with regards to Completions JS completion records have some finer details that can only be seen when using eval(), where the value of the completion record becomes important. Fix most of those cases to be compliant with the spec. Change-Id: I0c8105a8e778de7be3aea151d1bd64243aea067c Reviewed-by: Simon Hausmann --- tests/auto/qml/qqmlecmascript/data/tryStatement.3.qml | 2 +- tests/auto/qml/qqmlecmascript/data/tryStatement.4.qml | 2 +- tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto/qml/qqmlecmascript') diff --git a/tests/auto/qml/qqmlecmascript/data/tryStatement.3.qml b/tests/auto/qml/qqmlecmascript/data/tryStatement.3.qml index 04b39f73d5..7f5a22a459 100644 --- a/tests/auto/qml/qqmlecmascript/data/tryStatement.3.qml +++ b/tests/auto/qml/qqmlecmascript/data/tryStatement.3.qml @@ -8,6 +8,6 @@ MyQmlObject { return 321 } - value: try { var p = go() } catch(e) { var p = defaultValue } finally { p == 123 } + qjsvalue: try { var p = go() } catch(e) { var p = defaultValue } finally { p == 123 } } diff --git a/tests/auto/qml/qqmlecmascript/data/tryStatement.4.qml b/tests/auto/qml/qqmlecmascript/data/tryStatement.4.qml index 231aaf0683..39d4f74e97 100644 --- a/tests/auto/qml/qqmlecmascript/data/tryStatement.4.qml +++ b/tests/auto/qml/qqmlecmascript/data/tryStatement.4.qml @@ -7,6 +7,6 @@ MyQmlObject { return 321 } - value: try { var p = go() } catch(e) { var p = defaultValue } finally { p == 321 } + qjsvalue: try { var p = go() } catch(e) { var p = defaultValue } finally { p == 321 } } diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 5959ecc19f..acdee3a808 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -7371,7 +7371,7 @@ void tst_qqmlecmascript::tryStatement() MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != nullptr); - QCOMPARE(object->value(), 1); + QVERIFY(object->qjsvalue().isUndefined()); } { @@ -7379,7 +7379,7 @@ void tst_qqmlecmascript::tryStatement() MyQmlObject *object = qobject_cast(component.create()); QVERIFY(object != nullptr); - QCOMPARE(object->value(), 1); + QVERIFY(object->qjsvalue().isUndefined()); } } -- cgit v1.2.3