on xenial help sign in
Singleton bug is fixed.
commit145d33b99aafea69baf102c5a08c56a61587beab authorMichał Sawicz <michal.sawicz@canonical.com> dateFri 1 May 2015, 14:48 (11 years ago) parent4eeaf75
1 file changed+3−8
tests/qmltests/utils/Unity/Test/tst_UnityTest.qml+3−8
tests/qmltests/utils/Unity/Test/tst_UnityTest.qml+3−8
@@ -30,28 +30,23 @@ TestCase {
3030 id: testObject
3131 }
3232
33− // Singletons need to be bound to a property and not-named-imported
34− // for them to be able to be properly passed back to C++.
35− // See https://bugreports.qt-project.org/browse/QTBUG-30730
36− property var util: Util
37−
3833 function test_direct() {
3934 compare(Util.isInstanceOf(rect, "QQuickRectangle"), true, "rect should be an instance of QQuickRectangle");
40− compare(Util.isInstanceOf(util, "TestUtil"), true, "Util should be an instance of TestUtil");
35+ compare(Util.isInstanceOf(Util, "TestUtil"), true, "Util should be an instance of TestUtil");
4136 compare(Util.isInstanceOf(testObject, "MockObjectForInstanceOfTestChild"), true, "testObject should be an instance of MockObjectForInstanceOfTestChild");
4237 }
4338
4439 function test_inherited() {
4540 compare(Util.isInstanceOf(rect, "QQuickItem"), true, "rect should be an instance of QQuickItem");
4641 compare(Util.isInstanceOf(rect, "QObject"), true, "rect should be an instance of QObject");
47− compare(Util.isInstanceOf(util, "QObject"), true, "Util should be an instance of QObject");
42+ compare(Util.isInstanceOf(Util, "QObject"), true, "Util should be an instance of QObject");
4843 compare(Util.isInstanceOf(testObject, "MockObjectForInstanceOfTest"), true, "testObject should be an instance of MockObjectForInstanceOfTest");
4944 compare(Util.isInstanceOf(testObject, "QQuickRectangle"), true, "testObject should be an instance of QQuickRectangle");
5045 }
5146
5247 function test_negative() {
5348 compare(Util.isInstanceOf(rect, "QQuickMouseArea"), false, "rect should not be an instance of MouseArea");
54− compare(Util.isInstanceOf(util, "QQuickItem"), false, "Util should not be an instance of QQuickItem");
49+ compare(Util.isInstanceOf(Util, "QQuickItem"), false, "Util should not be an instance of QQuickItem");
5550 }
5651
5752 function test_undefined() {