summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_progressbar.qml
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-04-09 08:26:46 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-11 11:12:56 +0200
commit6b910dcbb51f0e03143dd1fc10b17fb396898df9 (patch)
tree84d3d0ae891be55fd4bc1a3cc16673dde3a9297c /tests/auto/controls/data/tst_progressbar.qml
parent7a20567396d74aae386a5a588f24e5c26c3aab0f (diff)
downloadqtquickcontrols-6b910dcbb51f0e03143dd1fc10b17fb396898df9.tar.gz
Tests: Destroy created components at the end of the tests functions
To ensure the components don't interfere with other functions. Change-Id: Ie22311471021175d23ae47c9e3a1ec603e803f2c Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_progressbar.qml')
-rw-r--r--tests/auto/controls/data/tst_progressbar.qml24
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/auto/controls/data/tst_progressbar.qml b/tests/auto/controls/data/tst_progressbar.qml
index b68a592a..02b96ac3 100644
--- a/tests/auto/controls/data/tst_progressbar.qml
+++ b/tests/auto/controls/data/tst_progressbar.qml
@@ -59,6 +59,7 @@ TestCase {
progressBar.minimumValue = 7
compare(progressBar.value, 7)
+ progressBar.destroy()
}
function test_maximumvalue() {
@@ -72,6 +73,7 @@ TestCase {
progressBar.maximumValue = 8
compare(progressBar.value, 8)
+ progressBar.destroy()
}
function test_invalidMinMax() {
@@ -94,25 +96,31 @@ TestCase {
var progressBar2 = Qt.createQmlObject('import QtQuick.Controls 1.0; ProgressBar {minimumValue: 10; maximumValue: 4; value: 5}', testCase, '');
compare(progressBar.value, progressBar.minimumValue)
+ progressBar.destroy()
+ progressBar2.destroy()
}
function test_initialization_order()
{
- var spinbox = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar {maximumValue: 100; value: 50}",
+ var progressBar = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar {maximumValue: 100; value: 50}",
testCase, '')
- compare(spinbox.value, 50);
+ compare(progressBar.value, 50);
- spinbox = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar {" +
+ var progressBar2 = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar {" +
"value: 50; maximumValue: 100}",
testCase, '')
- compare(spinbox.value, 50);
+ compare(progressBar2.value, 50);
- spinbox = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar { minimumValue: -50 ; value:-10}",
+ var progressBar3 = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar { minimumValue: -50 ; value:-10}",
testCase, '')
- compare(spinbox.value, -10);
+ compare(progressBar3.value, -10);
- spinbox = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar { value:-10; minimumValue: -50}",
+ var progressBar4 = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar { value:-10; minimumValue: -50}",
testCase, '')
- compare(spinbox.value, -10);
+ compare(progressBar4.value, -10);
+ progressBar.destroy()
+ progressBar2.destroy()
+ progressBar3.destroy()
+ progressBar4.destroy()
}
}