aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qjsvalue
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2011-08-22 13:15:52 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-24 10:11:29 +0200
commite6c0633a9c386817017a97dac9e541a45f42fd7f (patch)
tree266e0a6ed2b31157c3eb5aaf26d80196b8a69dd7 /tests/auto/declarative/qjsvalue
parentff7bd14ec74b76c277bcd66026c42bfe209f0af6 (diff)
Fix tst_qjsvalue::castToPointer test failure
In order for casting the variant's data() to work, we need to get at the actual QVariant wrapped in the JS object; copying the variant caused a stale pointer to be returned. Task-number: QTBUG-21000 Change-Id: I1a32a70d5a043c94dbbd07ef2c8048e7df7fc7bf Reviewed-on: http://codereview.qt.nokia.com/3309 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qjsvalue')
-rw-r--r--tests/auto/declarative/qjsvalue/tst_qjsvalue.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/auto/declarative/qjsvalue/tst_qjsvalue.cpp b/tests/auto/declarative/qjsvalue/tst_qjsvalue.cpp
index 4eef465ddd..24330c9f2e 100644
--- a/tests/auto/declarative/qjsvalue/tst_qjsvalue.cpp
+++ b/tests/auto/declarative/qjsvalue/tst_qjsvalue.cpp
@@ -3705,11 +3705,7 @@ void tst_QJSValue::castToPointer()
QJSValue v = eng.newVariant(int(123));
int *ip = qjsvalue_cast<int*>(v);
QVERIFY(ip != 0);
-#ifdef Q_WS_QPA
- QEXPECT_FAIL("", "QTBUG-21000 fails", Abort);
-#endif
QCOMPARE(*ip, 123);
- QEXPECT_FAIL("", "Pointer magic for variants is currently not supported by QJSEngine", Abort);
*ip = 456;
QCOMPARE(qjsvalue_cast<int>(v), 456);