~macslow/unity/phablet-notification-renderer

« back to all changes in this revision

Viewing changes to tests/qmltests/utils/Unity/Test/tst_UnityTest.qml

  • Committer: Mirco Müller
  • Date: 2013-05-13 12:38:00 UTC
  • mfrom: (507.2.162 phablet)
  • Revision ID: mirco.mueller@ubuntu.com-20130513123800-bbffopyq469ptxyj
Merge with trunk (unity/phablet)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
        id: rect
25
25
    }
26
26
 
 
27
    MockObjectForInstanceOfTestChild {
 
28
        id: testObject
 
29
    }
 
30
 
27
31
    // Singletons need to be bound to a property and not-named-imported
28
32
    // for them to be able to be properly passed back to C++.
29
33
    // See https://bugreports.qt-project.org/browse/QTBUG-30730
32
36
    function test_direct() {
33
37
        compare(Util.isInstanceOf(rect, "QQuickRectangle"), true, "rect should be an instance of QQuickRectangle");
34
38
        compare(Util.isInstanceOf(util, "TestUtil"), true, "Util should be an instance of TestUtil");
 
39
        compare(Util.isInstanceOf(testObject, "MockObjectForInstanceOfTestChild"), true, "testObject should be an instance of MockObjectForInstanceOfTestChild");
35
40
    }
36
41
 
37
42
    function test_inherited() {
38
43
        compare(Util.isInstanceOf(rect, "QQuickItem"), true, "rect should be an instance of QQuickItem");
39
44
        compare(Util.isInstanceOf(rect, "QObject"), true, "rect should be an instance of QObject");
40
45
        compare(Util.isInstanceOf(util, "QObject"), true, "Util should be an instance of QObject");
 
46
        compare(Util.isInstanceOf(testObject, "MockObjectForInstanceOfTest"), true, "testObject should be an instance of MockObjectForInstanceOfTest");
 
47
        compare(Util.isInstanceOf(testObject, "QQuickRectangle"), true, "testObject should be an instance of QQuickRectangle");
41
48
    }
42
49
 
43
50
    function test_negative() {