Improve composite property type unit test
authorChris Adams <christopher.adams@nokia.com>
Thu, 17 May 2012 03:40:50 +0000 (13:40 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 17 May 2012 10:23:48 +0000 (12:23 +0200)
commitc556eecc25e24d6ee4f5c9965193a588c93b95fc
tree2052f14c0ed7219309877408eca552007122817e
parent43a6cc75886c662e63db440dd191cefa1fe956f3
Improve composite property type unit test

Previously, the test ensured that the (variant) value returned by
QQmlProperty::read() was identical to that returned by
QMetaProperty::read(), which isn't the case if an engine is passed
to the QQmlProperty constructor.  This commit expands the unit test
to ensure that the actual QObject-ptr value is identical, rather
than the variant value (which may have differing type information),
regardless of whether an engine is passed in or not.

For list properties, the individual values are (in general) not able
to be accessed, and so the unit test for list properties is relaxed.

Change-Id: Iec40dca147a0bb793359b28facbcae69cc49c1ad
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp