aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_groupbox.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-06-29 19:14:55 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-06-29 17:56:58 +0000
commite7869a71faf9d3b2c120e734c7323df0bf41dff6 (patch)
treef7aef5868b2379d80bf726407375a64990dcd279 /tests/auto/controls/data/tst_groupbox.qml
parent68e45b4852c2fa3a7722619470d35fb506d44a54 (diff)
Cleanup & improve auto tests
- always verify component creation to catch errors early - remove empty init() and cleanup() functions - remove redundant "defaults" checks Change-Id: I39f16404fa2e3d3e38348742afd8f51ea36b2f05 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls/data/tst_groupbox.qml')
-rw-r--r--tests/auto/controls/data/tst_groupbox.qml12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_groupbox.qml b/tests/auto/controls/data/tst_groupbox.qml
index 1a2f2efb..baa1d3f9 100644
--- a/tests/auto/controls/data/tst_groupbox.qml
+++ b/tests/auto/controls/data/tst_groupbox.qml
@@ -79,30 +79,38 @@ TestCase {
}
}
- function test_defaults() {
+ function test_empty() {
var control = groupBox.createObject(testCase)
+ verify(control)
+
verify(control.contentItem)
compare(control.contentWidth, 0)
compare(control.contentHeight, 0)
- compare(control.title, "")
+
control.destroy()
}
function test_oneChild() {
var control = oneChildBox.createObject(testCase)
+ verify(control)
+
compare(control.contentWidth, 100)
compare(control.contentHeight, 30)
verify(control.implicitWidth > 100)
verify(control.implicitHeight > 30)
+
control.destroy()
}
function test_twoChildren() {
var control = twoChildrenBox.createObject(testCase)
+ verify(control)
+
compare(control.contentWidth, 0)
compare(control.contentHeight, 0)
verify(control.implicitWidth > 0)
verify(control.implicitHeight > 0)
+
control.destroy()
}
}