aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-12-16 15:21:22 +0100
committerMitch Curtis <mitch.curtis@qt.io>2016-12-17 09:43:20 +0000
commitb2de056f6f04cea57dc44f37b41d07e94c03e183 (patch)
tree173f68f6d141b6b54c4bacb02ae94592472ca6ed /tests/auto
parentfa766648b234c65b9025ad62f3a29eb83d89ae8f (diff)
tst_pageindicator: use TestCase's new createTemporaryObject functions
This ensures that the appropriate objects are destroyed at the end of each test function, even if the test fails. Change-Id: Ife9d9680dcce6685c43e7ee52cd4782bc6961a3f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/controls/data/tst_pageindicator.qml14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/auto/controls/data/tst_pageindicator.qml b/tests/auto/controls/data/tst_pageindicator.qml
index a39265c3..e68e8bb7 100644
--- a/tests/auto/controls/data/tst_pageindicator.qml
+++ b/tests/auto/controls/data/tst_pageindicator.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -56,29 +56,25 @@ TestCase {
}
function test_count() {
- var control = pageIndicator.createObject(testCase)
+ var control = createTemporaryObject(pageIndicator, testCase)
verify(control)
compare(control.count, 0)
control.count = 3
compare(control.count, 3)
-
- control.destroy()
}
function test_currentIndex() {
- var control = pageIndicator.createObject(testCase)
+ var control = createTemporaryObject(pageIndicator, testCase)
verify(control)
compare(control.currentIndex, 0)
control.currentIndex = 5
compare(control.currentIndex, 5)
-
- control.destroy()
}
function test_interactive() {
- var control = pageIndicator.createObject(testCase, {count: 5})
+ var control = createTemporaryObject(pageIndicator, testCase, {count: 5})
verify(control)
verify(!control.interactive)
@@ -110,7 +106,5 @@ TestCase {
}
}
}
-
- control.destroy()
}
}