Fix some issues with init_data() for qmltest
authorCharles Yin <charles.yin@nokia.com>
Thu, 5 Apr 2012 00:17:34 +0000 (10:17 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 5 Apr 2012 03:14:56 +0000 (05:14 +0200)
commit82a048c3cff06dd6e9a97a72d235decb1a39e1c3
treed10fa98238eb3b59d0752ec5dfb120ed6db07213
parent95cb2a1b5caf7d7158dd1176380c1458ea22b54f
Fix some issues with init_data() for qmltest

1. should not use hasOwnProperty, replace it with 'in'
2. the default init_data() method is unnessary
3. when init_data() returns empty, the test function should run in non data driven mode

Change-Id: I8cb19d3499b285d07c8b3d04abd9ddf33b1c5395
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/imports/testlib/TestCase.qml
tests/auto/qmltest/selftests/tst_datadriven.qml [new file with mode: 0644]