diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-06-07 14:06:36 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-07 19:17:02 +0200 |
commit | 21f5744d45ffc07af7978a9f5b382e99f78c2d31 (patch) | |
tree | 83e7886a6e49b00ac52ab0d2124504abedac1f32 /tests/auto/qml/qjsvalue | |
parent | d3243caf5a181855f6344c072f8dddea193d48fa (diff) |
Fix various errors in the qjsvalue auto test
Fix creation of Array's from a QStringList
Properly implement toVariant()
Fix VariantObject::toString()
Fix conversion of variant lists to JS values
Remove an XFAIL
Allow comparison of QJSValue objects created from different
engines. There's no reason why we can't simply do this with v4.
Change-Id: I8d8c597dbb032926501508d60bd80622ec964d67
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto/qml/qjsvalue')
-rw-r--r-- | tests/auto/qml/qjsvalue/tst_qjsvalue.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp index fa0456f6ea..2ee344a9ef 100644 --- a/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp +++ b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp @@ -2070,7 +2070,6 @@ void tst_QJSValue::equals() { QJSValue var1 = eng.toScriptValue(QVariant(QPoint(1, 2))); QJSValue var2 = eng.toScriptValue(QVariant(QPoint(1, 2))); - QEXPECT_FAIL("", "FIXME: QVariant comparison does not work with v8", Continue); QVERIFY(var1.equals(var2)); } { @@ -2078,12 +2077,6 @@ void tst_QJSValue::equals() QJSValue var2 = eng.toScriptValue(QVariant(QPoint(3, 4))); QVERIFY(!var1.equals(var2)); } - - QJSEngine otherEngine; - QTest::ignoreMessage(QtWarningMsg, "QJSValue::equals: " - "cannot compare to a value created in " - "a different engine"); - QCOMPARE(date1.equals(otherEngine.toScriptValue(123)), false); } void tst_QJSValue::strictlyEquals() @@ -2221,12 +2214,6 @@ void tst_QJSValue::strictlyEquals() QJSValue var2 = eng.toScriptValue(QVariant(QPoint(3, 4))); QVERIFY(!var1.strictlyEquals(var2)); } - - QJSEngine otherEngine; - QTest::ignoreMessage(QtWarningMsg, "QJSValue::strictlyEquals: " - "cannot compare to a value created in " - "a different engine"); - QCOMPARE(date1.strictlyEquals(otherEngine.toScriptValue(123)), false); } Q_DECLARE_METATYPE(int*) |