diff options
author | Caroline Chao <caroline.chao@digia.com> | 2013-03-07 14:56:28 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-07 18:33:00 +0100 |
commit | 8c142768e42c450c14225b1d9354836aec0b0126 (patch) | |
tree | 838ffe8cd818b51738e8a896a3a2bcf21bde44b3 /tests/auto | |
parent | 506287b9cf147e3457b19c9060c60c46ab1df4ac (diff) | |
download | qtquickcontrols-8c142768e42c450c14225b1d9354836aec0b0126.tar.gz |
Tests: Fix initialization value of ProgressBar
The initialization order should not matter when setting the
properties.
Change-Id: I012facbbe4d0b005ee55314034d12d552fcafbf2
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/controls/data/tst_progressbar.qml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_progressbar.qml b/tests/auto/controls/data/tst_progressbar.qml index 0c2df386..4798d863 100644 --- a/tests/auto/controls/data/tst_progressbar.qml +++ b/tests/auto/controls/data/tst_progressbar.qml @@ -95,4 +95,24 @@ TestCase { var progressBar2 = Qt.createQmlObject('import QtQuick.Controls 1.0; ProgressBar {minimumValue: 10; maximumValue: 4; value: 5}', testCase, ''); compare(progressBar.value, progressBar.minimumValue) } + + function test_initialization_order() + { + var spinbox = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar {maximumValue: 100; value: 50}", + testCase, '') + compare(spinbox.value, 50); + + spinbox = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar {" + + "value: 50; maximumValue: 100}", + testCase, '') + compare(spinbox.value, 50); + + spinbox = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar { minimumValue: -50 ; value:-10}", + testCase, '') + compare(spinbox.value, -10); + + spinbox = Qt.createQmlObject("import QtQuick.Controls 1.0; ProgressBar { value:-10; minimumValue: -50}", + testCase, '') + compare(spinbox.value, -10); + } } |