aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/controls/data/tst_busyindicator.qml3
-rw-r--r--tests/auto/controls/data/tst_button.qml18
-rw-r--r--tests/auto/controls/data/tst_checkbox.qml22
-rw-r--r--tests/auto/controls/data/tst_control.qml14
-rw-r--r--tests/auto/controls/data/tst_exclusivegroup.qml11
-rw-r--r--tests/auto/controls/data/tst_frame.qml11
-rw-r--r--tests/auto/controls/data/tst_groupbox.qml12
-rw-r--r--tests/auto/controls/data/tst_progressbar.qml33
-rw-r--r--tests/auto/controls/data/tst_radiobutton.qml22
-rw-r--r--tests/auto/controls/data/tst_scrollbar.qml23
-rw-r--r--tests/auto/controls/data/tst_scrollindicator.qml22
-rw-r--r--tests/auto/controls/data/tst_slider.qml40
-rw-r--r--tests/auto/controls/data/tst_stackview.qml29
-rw-r--r--tests/auto/controls/data/tst_switch.qml16
-rw-r--r--tests/auto/controls/data/tst_togglebutton.qml16
-rw-r--r--tests/auto/controls/data/tst_toolbar.qml11
-rw-r--r--tests/auto/controls/data/tst_toolbutton.qml12
-rw-r--r--tests/auto/extras/data/tst_swipeview.qml9
18 files changed, 162 insertions, 162 deletions
diff --git a/tests/auto/controls/data/tst_busyindicator.qml b/tests/auto/controls/data/tst_busyindicator.qml
index 66628a24..142ec70a 100644
--- a/tests/auto/controls/data/tst_busyindicator.qml
+++ b/tests/auto/controls/data/tst_busyindicator.qml
@@ -57,9 +57,12 @@ TestCase {
function test_running() {
var control = busyIndicator.createObject(testCase)
+ verify(control)
+
compare(control.running, true)
control.running = false
compare(control.running, false)
+
control.destroy()
}
}
diff --git a/tests/auto/controls/data/tst_button.qml b/tests/auto/controls/data/tst_button.qml
index ce3ae6c5..eab82eab 100644
--- a/tests/auto/controls/data/tst_button.qml
+++ b/tests/auto/controls/data/tst_button.qml
@@ -62,33 +62,22 @@ TestCase {
}
}
- function init() {
- }
-
- function cleanup() {
- }
-
- function test_defaults() {
+ function test_text() {
var control = button.createObject(testCase)
verify(control)
- verify(control.label)
- compare(control.text, "")
- compare(control.pressed, false)
- control.destroy()
- }
- function test_text() {
- var control = button.createObject(testCase)
compare(control.text, "")
control.text = "Button"
compare(control.text, "Button")
control.text = ""
compare(control.text, "")
+
control.destroy()
}
function test_mouse() {
var control = button.createObject(testCase)
+ verify(control)
// click
control.spy.expectedSequence = [["pressedChanged", { "pressed": true }], "pressed"]
@@ -133,6 +122,7 @@ TestCase {
function test_keys() {
var control = button.createObject(testCase)
+ verify(control)
control.forceActiveFocus()
verify(control.activeFocus)
diff --git a/tests/auto/controls/data/tst_checkbox.qml b/tests/auto/controls/data/tst_checkbox.qml
index 525d6d07..b4874642 100644
--- a/tests/auto/controls/data/tst_checkbox.qml
+++ b/tests/auto/controls/data/tst_checkbox.qml
@@ -62,35 +62,22 @@ TestCase {
}
}
- function init() {
- }
-
- function cleanup() {
- }
-
- function test_defaults() {
+ function test_text() {
var control = checkBox.createObject(testCase)
verify(control)
- verify(control.label)
- verify(control.indicator)
- compare(control.text, "")
- compare(control.pressed, false)
- compare(control.checked, false)
- control.destroy()
- }
- function test_text() {
- var control = checkBox.createObject(testCase)
compare(control.text, "")
control.text = "CheckBox"
compare(control.text, "CheckBox")
control.text = ""
compare(control.text, "")
+
control.destroy()
}
function test_checked() {
var control = checkBox.createObject(testCase)
+ verify(control)
control.spy.expectedSequence = []
compare(control.checked, false)
@@ -111,6 +98,7 @@ TestCase {
function test_mouse() {
var control = checkBox.createObject(testCase)
+ verify(control)
// check
control.spy.expectedSequence = [["pressedChanged", { "pressed": true, "checked": false }],
@@ -173,6 +161,7 @@ TestCase {
function test_keys() {
var control = checkBox.createObject(testCase)
+ verify(control)
control.spy.expectedSequence = []
control.forceActiveFocus()
@@ -224,6 +213,7 @@ TestCase {
function test_binding() {
var container = twoCheckBoxes.createObject(testCase)
+ verify(container)
compare(container.cb1.checked, false)
compare(container.cb2.checked, false)
diff --git a/tests/auto/controls/data/tst_control.qml b/tests/auto/controls/data/tst_control.qml
index 555328a1..d8b1e3df 100644
--- a/tests/auto/controls/data/tst_control.qml
+++ b/tests/auto/controls/data/tst_control.qml
@@ -70,12 +70,10 @@ TestCase {
signalName: "mirroredChanged"
}
- function test_defaults() {
+ function test_padding() {
var control = component.createObject(testCase)
verify(control)
- compare(control.layoutDirection, Qt.LeftToRight)
- compare(control.effectiveLayoutDirection, Qt.LeftToRight)
- compare(control.mirrored, false)
+
compare(control.padding, 0)
compare(control.topPadding, 0)
compare(control.leftPadding, 0)
@@ -83,11 +81,6 @@ TestCase {
compare(control.bottomPadding, 0)
compare(control.availableWidth, 0)
compare(control.availableHeight, 0)
- control.destroy()
- }
-
- function test_padding() {
- var control = component.createObject(testCase)
control.width = 100
control.height = 100
@@ -139,6 +132,7 @@ TestCase {
function test_availableSize() {
var control = component.createObject(testCase)
+ verify(control)
control.width = 100
control.height = 100
@@ -174,6 +168,7 @@ TestCase {
function test_layoutDirection() {
var control = component.createObject(testCase)
+ verify(control)
layoutDirectionSpy.target = control
effectiveLayoutDirectionSpy.target = control
@@ -225,6 +220,7 @@ TestCase {
function test_background() {
var control = component.createObject(testCase)
+ verify(control)
control.background = component.createObject(control)
diff --git a/tests/auto/controls/data/tst_exclusivegroup.qml b/tests/auto/controls/data/tst_exclusivegroup.qml
index d8ae6103..ba840d26 100644
--- a/tests/auto/controls/data/tst_exclusivegroup.qml
+++ b/tests/auto/controls/data/tst_exclusivegroup.qml
@@ -70,15 +70,9 @@ TestCase {
currentSpy.clear()
}
- function test_defaults() {
- var group = exclusiveGroup.createObject(testCase)
- verify(group)
- verify(!group.current)
- group.destroy()
- }
-
function test_null() {
var group = exclusiveGroup.createObject(testCase)
+ verify(group)
group.addCheckable(null)
group.removeCheckable(null)
@@ -93,9 +87,11 @@ TestCase {
function test_current() {
var group = exclusiveGroup.createObject(testCase)
+ verify(group)
currentSpy.target = group
verify(currentSpy.valid)
+ verify(!group.current)
var checkable1 = checkable.createObject(testCase, {checked: true})
var checkable2 = checkable.createObject(testCase, {checked: false})
@@ -211,6 +207,7 @@ TestCase {
function test_controls(data) {
var container = data.component.createObject(testCase)
+ verify(container)
verify(!container.group.current)
diff --git a/tests/auto/controls/data/tst_frame.qml b/tests/auto/controls/data/tst_frame.qml
index 43e0c298..6b65691b 100644
--- a/tests/auto/controls/data/tst_frame.qml
+++ b/tests/auto/controls/data/tst_frame.qml
@@ -79,29 +79,38 @@ TestCase {
}
}
- function test_defaults() {
+ function test_empty() {
var control = frame.createObject(testCase)
+ verify(control)
+
verify(control.contentItem)
compare(control.contentWidth, 0)
compare(control.contentHeight, 0)
+
control.destroy()
}
function test_oneChild() {
var control = oneChildFrame.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 = twoChildrenFrame.createObject(testCase)
+ verify(control)
+
compare(control.contentWidth, 0)
compare(control.contentHeight, 0)
verify(control.implicitWidth > 0)
verify(control.implicitHeight > 0)
+
control.destroy()
}
}
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()
}
}
diff --git a/tests/auto/controls/data/tst_progressbar.qml b/tests/auto/controls/data/tst_progressbar.qml
index 7958c96c..b9135fd1 100644
--- a/tests/auto/controls/data/tst_progressbar.qml
+++ b/tests/auto/controls/data/tst_progressbar.qml
@@ -55,16 +55,12 @@ TestCase {
ProgressBar { }
}
- function test_defaults() {
+ function test_value() {
var control = progressBar.createObject(testCase)
- compare(control.value, 0)
- compare(control.visualPosition, 0)
- compare(control.indeterminate, false)
- control.destroy()
- }
+ verify(control)
- function test_value() {
- var control = progressBar.createObject(testCase, {value: 0.5})
+ compare(control.value, 0.0)
+ control.value = 0.5
compare(control.value, 0.5)
control.value = 1.0
compare(control.value, 1.0)
@@ -72,11 +68,14 @@ TestCase {
compare(control.value, 0.0)
control.value = 2.0
compare(control.value, 1.0)
+
control.destroy()
}
function test_range() {
var control = progressBar.createObject(testCase, {from: 0, to: 100, value: 50})
+ verify(control)
+
compare(control.from, 0)
compare(control.to, 100)
compare(control.value, 50)
@@ -109,6 +108,8 @@ TestCase {
function test_inverted() {
var control = progressBar.createObject(testCase, {from: 1.0, to: -1.0})
+ verify(control)
+
compare(control.from, 1.0)
compare(control.to, -1.0)
compare(control.value, 0.0)
@@ -130,7 +131,13 @@ TestCase {
}
function test_position() {
- var control = progressBar.createObject(testCase, {value: 0.25})
+ var control = progressBar.createObject(testCase)
+ verify(control)
+
+ compare(control.value, 0)
+ compare(control.position, 0)
+
+ control.value = 0.25
compare(control.value, 0.25)
compare(control.position, 0.25)
@@ -142,7 +149,13 @@ TestCase {
}
function test_visualPosition() {
- var control = progressBar.createObject(testCase, {value: 0.25})
+ var control = progressBar.createObject(testCase)
+ verify(control)
+
+ compare(control.value, 0)
+ compare(control.visualPosition, 0)
+
+ control.value = 0.25
compare(control.value, 0.25)
compare(control.visualPosition, 0.25)
diff --git a/tests/auto/controls/data/tst_radiobutton.qml b/tests/auto/controls/data/tst_radiobutton.qml
index 8902de70..050cadb7 100644
--- a/tests/auto/controls/data/tst_radiobutton.qml
+++ b/tests/auto/controls/data/tst_radiobutton.qml
@@ -62,35 +62,22 @@ TestCase {
}
}
- function init() {
- }
-
- function cleanup() {
- }
-
- function test_defaults() {
+ function test_text() {
var control = radioButton.createObject(testCase)
verify(control)
- verify(control.label)
- verify(control.indicator)
- compare(control.text, "")
- compare(control.pressed, false)
- compare(control.checked, false)
- control.destroy()
- }
- function test_text() {
- var control = radioButton.createObject(testCase)
compare(control.text, "")
control.text = "RadioButton"
compare(control.text, "RadioButton")
control.text = ""
compare(control.text, "")
+
control.destroy()
}
function test_checked() {
var control = radioButton.createObject(testCase)
+ verify(control)
control.spy.expectedSequence = [] // No change expected
compare(control.checked, false)
@@ -111,6 +98,7 @@ TestCase {
function test_mouse() {
var control = radioButton.createObject(testCase)
+ verify(control)
// check
control.spy.expectedSequence = [["pressedChanged", { "pressed": true, "checked": false }],
@@ -171,6 +159,7 @@ TestCase {
function test_keys() {
var control = radioButton.createObject(testCase)
+ verify(control)
control.spy.expectedSequence = []
control.forceActiveFocus()
@@ -221,6 +210,7 @@ TestCase {
function test_binding() {
var container = twoRadioButtones.createObject(testCase)
+ verify(container)
compare(container.rb1.checked, false)
compare(container.rb2.checked, false)
diff --git a/tests/auto/controls/data/tst_scrollbar.qml b/tests/auto/controls/data/tst_scrollbar.qml
index d4033622..6e1a328c 100644
--- a/tests/auto/controls/data/tst_scrollbar.qml
+++ b/tests/auto/controls/data/tst_scrollbar.qml
@@ -82,23 +82,18 @@ TestCase {
pressedSpy.clear()
}
- function test_defaults() {
- var control = scrollBar.createObject(testCase)
- verify(control)
- verify(control.handle)
- compare(control.size, 0.0)
- compare(control.position, 0.0)
- compare(control.active, false)
- compare(control.orientation, Qt.Vertical)
- control.destroy()
- }
-
function test_attach() {
var container = flickable.createObject(testCase)
+ verify(container)
waitForRendering(container)
var vertical = scrollBar.createObject()
verify(!vertical.parent)
+ compare(vertical.size, 0.0)
+ compare(vertical.position, 0.0)
+ compare(vertical.active, false)
+ compare(vertical.orientation, Qt.Vertical)
+
container.AbstractScrollBar.vertical = vertical
compare(vertical.parent, container)
compare(vertical.orientation, Qt.Vertical)
@@ -107,6 +102,11 @@ TestCase {
var horizontal = scrollBar.createObject()
verify(!horizontal.parent)
+ compare(horizontal.size, 0.0)
+ compare(horizontal.position, 0.0)
+ compare(horizontal.active, false)
+ compare(horizontal.orientation, Qt.Vertical)
+
container.AbstractScrollBar.horizontal = horizontal
compare(horizontal.parent, container)
compare(horizontal.orientation, Qt.Horizontal)
@@ -147,6 +147,7 @@ TestCase {
function test_mouse(data) {
var control = scrollBar.createObject(testCase, data.properties)
+ verify(control)
pressedSpy.target = control
verify(pressedSpy.valid)
diff --git a/tests/auto/controls/data/tst_scrollindicator.qml b/tests/auto/controls/data/tst_scrollindicator.qml
index a5cccba8..77d162b6 100644
--- a/tests/auto/controls/data/tst_scrollindicator.qml
+++ b/tests/auto/controls/data/tst_scrollindicator.qml
@@ -67,23 +67,18 @@ TestCase {
}
}
- function test_defaults() {
- var control = scrollIndicator.createObject(testCase)
- verify(control)
- verify(control.indicator)
- compare(control.size, 0.0)
- compare(control.position, 0.0)
- compare(control.active, false)
- compare(control.orientation, Qt.Vertical)
- control.destroy()
- }
-
function test_attach() {
var container = flickable.createObject(testCase)
+ verify(container)
waitForRendering(container)
var vertical = scrollIndicator.createObject()
verify(!vertical.parent)
+ compare(vertical.size, 0.0)
+ compare(vertical.position, 0.0)
+ compare(vertical.active, false)
+ compare(vertical.orientation, Qt.Vertical)
+
container.AbstractScrollIndicator.vertical = vertical
compare(vertical.parent, container)
compare(vertical.orientation, Qt.Vertical)
@@ -92,6 +87,11 @@ TestCase {
var horizontal = scrollIndicator.createObject()
verify(!horizontal.parent)
+ compare(horizontal.size, 0.0)
+ compare(horizontal.position, 0.0)
+ compare(horizontal.active, false)
+ compare(horizontal.orientation, Qt.Vertical)
+
container.AbstractScrollIndicator.horizontal = horizontal
compare(horizontal.parent, container)
compare(horizontal.orientation, Qt.Horizontal)
diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml
index 2e9dec2b..e985103f 100644
--- a/tests/auto/controls/data/tst_slider.qml
+++ b/tests/auto/controls/data/tst_slider.qml
@@ -73,20 +73,20 @@ TestCase {
function test_defaults() {
var control = slider.createObject(testCase)
verify(control)
- verify(control.handle)
- verify(control.track)
- compare(control.value, 0)
- compare(control.position, 0)
- compare(control.visualPosition, 0)
+
compare(control.stepSize, 0)
compare(control.snapMode, AbstractSlider.NoSnap)
- compare(control.pressed, false)
compare(control.orientation, Qt.Horizontal)
+
control.destroy()
}
function test_value() {
- var control = slider.createObject(testCase, {value: 0.5})
+ var control = slider.createObject(testCase)
+ verify(control)
+
+ compare(control.value, 0.0)
+ control.value = 0.5
compare(control.value, 0.5)
control.value = 1.0
compare(control.value, 1.0)
@@ -94,11 +94,14 @@ TestCase {
compare(control.value, 0.0)
control.value = 2.0
compare(control.value, 1.0)
+
control.destroy()
}
function test_range() {
var control = slider.createObject(testCase, {from: 0, to: 100, value: 50})
+ verify(control)
+
compare(control.from, 0)
compare(control.to, 100)
compare(control.value, 50)
@@ -131,6 +134,8 @@ TestCase {
function test_inverted() {
var control = slider.createObject(testCase, {from: 1.0, to: -1.0})
+ verify(control)
+
compare(control.from, 1.0)
compare(control.to, -1.0)
compare(control.value, 0.0)
@@ -152,7 +157,13 @@ TestCase {
}
function test_position() {
- var control = slider.createObject(testCase, {value: 0.25})
+ var control = slider.createObject(testCase)
+ verify(control)
+
+ compare(control.value, 0.0)
+ compare(control.position, 0.0)
+
+ control.value = 0.25
compare(control.value, 0.25)
compare(control.position, 0.25)
@@ -164,7 +175,13 @@ TestCase {
}
function test_visualPosition() {
- var control = slider.createObject(testCase, {value: 0.25})
+ var control = slider.createObject(testCase)
+ verify(control)
+
+ compare(control.value, 0.0)
+ compare(control.visualPosition, 0.0)
+
+ control.value = 0.25
compare(control.value, 0.25)
compare(control.visualPosition, 0.25)
@@ -185,11 +202,14 @@ TestCase {
function test_orientation() {
var control = slider.createObject(testCase)
+ verify(control)
+
compare(control.orientation, Qt.Horizontal)
verify(control.width > control.height)
control.orientation = Qt.Vertical
compare(control.orientation, Qt.Vertical)
verify(control.width < control.height)
+
control.destroy()
}
@@ -202,6 +222,7 @@ TestCase {
function test_mouse(data) {
var control = slider.createObject(testCase, {orientation: data.orientation})
+ verify(control)
pressedSpy.target = control
verify(pressedSpy.valid)
@@ -269,6 +290,7 @@ TestCase {
function test_keys(data) {
var control = slider.createObject(testCase, {orientation: data.orientation})
+ verify(control)
var pressedCount = 0
diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml
index 3e87853d..2d406e1b 100644
--- a/tests/auto/controls/data/tst_stackview.qml
+++ b/tests/auto/controls/data/tst_stackview.qml
@@ -59,28 +59,21 @@ TestCase {
StackView { }
}
- function test_defaults() {
- var control = stackView.createObject(testCase)
- verify(control)
- verify(control.pushEnter)
- verify(control.pushExit)
- verify(control.popEnter)
- verify(control.popExit)
- compare(control.depth, 0)
- compare(control.busy, false)
- compare(control.currentItem, null)
- compare(control.initialItem, undefined)
- control.destroy()
- }
-
function test_initialItem() {
- var control1 = stackView.createObject(testCase, {initialItem: item})
- compare(control1.currentItem, item)
+ var control1 = stackView.createObject(testCase)
+ verify(control1)
+ compare(control1.currentItem, null)
control1.destroy()
- var control2 = stackView.createObject(testCase, {initialItem: component})
- verify(control2.currentItem)
+ var control2 = stackView.createObject(testCase, {initialItem: item})
+ verify(control2)
+ compare(control2.currentItem, item)
control2.destroy()
+
+ var control3 = stackView.createObject(testCase, {initialItem: component})
+ verify(control3)
+ verify(control3.currentItem)
+ control3.destroy()
}
function test_currentItem() {
diff --git a/tests/auto/controls/data/tst_switch.qml b/tests/auto/controls/data/tst_switch.qml
index 470361a5..94aaab13 100644
--- a/tests/auto/controls/data/tst_switch.qml
+++ b/tests/auto/controls/data/tst_switch.qml
@@ -88,29 +88,22 @@ TestCase {
clickedSpy.clear()
}
- function test_defaults() {
+ function test_text() {
var control = swtch.createObject(testCase)
verify(control)
- verify(control.label)
- verify(control.indicator)
- compare(control.text, "")
- compare(control.pressed, false)
- compare(control.checked, false)
- control.destroy()
- }
- function test_text() {
- var control = swtch.createObject(testCase)
compare(control.text, "")
control.text = "Switch"
compare(control.text, "Switch")
control.text = ""
compare(control.text, "")
+
control.destroy()
}
function test_checked() {
var control = swtch.createObject(testCase)
+ verify(control)
checkedSpy.target = control
verify(checkedSpy.valid)
@@ -131,6 +124,7 @@ TestCase {
function test_mouse() {
var control = swtch.createObject(testCase)
+ verify(control)
checkedSpy.target = control
pressedSpy.target = control
@@ -203,6 +197,7 @@ TestCase {
function test_keys() {
var control = swtch.createObject(testCase)
+ verify(control)
checkedSpy.target = control
clickedSpy.target = control
@@ -246,6 +241,7 @@ TestCase {
function test_binding() {
var container = twoSwitches.createObject(testCase)
+ verify(container)
compare(container.sw1.checked, false)
compare(container.sw2.checked, false)
diff --git a/tests/auto/controls/data/tst_togglebutton.qml b/tests/auto/controls/data/tst_togglebutton.qml
index 8b7d0a85..416be713 100644
--- a/tests/auto/controls/data/tst_togglebutton.qml
+++ b/tests/auto/controls/data/tst_togglebutton.qml
@@ -88,29 +88,22 @@ TestCase {
clickedSpy.clear()
}
- function test_defaults() {
+ function test_text() {
var control = toggleButton.createObject(testCase)
verify(control)
- verify(control.label)
- verify(control.indicator)
- compare(control.text, "")
- compare(control.pressed, false)
- compare(control.checked, false)
- control.destroy()
- }
- function test_text() {
- var control = toggleButton.createObject(testCase)
compare(control.text, "")
control.text = "ToggleButton"
compare(control.text, "ToggleButton")
control.text = ""
compare(control.text, "")
+
control.destroy()
}
function test_checked() {
var control = toggleButton.createObject(testCase)
+ verify(control)
checkedSpy.target = control
verify(checkedSpy.valid)
@@ -131,6 +124,7 @@ TestCase {
function test_mouse() {
var control = toggleButton.createObject(testCase)
+ verify(control)
checkedSpy.target = control
pressedSpy.target = control
@@ -203,6 +197,7 @@ TestCase {
function test_keys() {
var control = toggleButton.createObject(testCase)
+ verify(control)
checkedSpy.target = control
clickedSpy.target = control
@@ -246,6 +241,7 @@ TestCase {
function test_binding() {
var container = twoToggleButtones.createObject(testCase)
+ verify(container)
compare(container.tb1.checked, false)
compare(container.tb2.checked, false)
diff --git a/tests/auto/controls/data/tst_toolbar.qml b/tests/auto/controls/data/tst_toolbar.qml
index 6b343894..8b20cca8 100644
--- a/tests/auto/controls/data/tst_toolbar.qml
+++ b/tests/auto/controls/data/tst_toolbar.qml
@@ -79,29 +79,38 @@ TestCase {
}
}
- function test_defaults() {
+ function test_empty() {
var control = toolBar.createObject(testCase)
+ verify(control)
+
verify(control.contentItem)
compare(control.contentWidth, 0)
compare(control.contentHeight, 0)
+
control.destroy()
}
function test_oneChild() {
var control = oneChildBar.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 = twoChildrenBar.createObject(testCase)
+ verify(control)
+
compare(control.contentWidth, 0)
compare(control.contentHeight, 0)
verify(control.implicitWidth > 0)
verify(control.implicitHeight > 0)
+
control.destroy()
}
}
diff --git a/tests/auto/controls/data/tst_toolbutton.qml b/tests/auto/controls/data/tst_toolbutton.qml
index 5e1d5cd4..c78a922a 100644
--- a/tests/auto/controls/data/tst_toolbutton.qml
+++ b/tests/auto/controls/data/tst_toolbutton.qml
@@ -79,27 +79,22 @@ TestCase {
clickedSpy.clear()
}
- function test_defaults() {
+ function test_text() {
var control = toolButton.createObject(testCase)
verify(control)
- verify(control.label)
- compare(control.text, "")
- compare(control.pressed, false)
- control.destroy()
- }
- function test_text() {
- var control = toolButton.createObject(testCase)
compare(control.text, "")
control.text = "ToolButton"
compare(control.text, "ToolButton")
control.text = ""
compare(control.text, "")
+
control.destroy()
}
function test_mouse() {
var control = toolButton.createObject(testCase)
+ verify(control)
pressedSpy.target = control
clickedSpy.target = control
@@ -149,6 +144,7 @@ TestCase {
function test_keys() {
var control = toolButton.createObject(testCase)
+ verify(control)
clickedSpy.target = control
verify(clickedSpy.valid)
diff --git a/tests/auto/extras/data/tst_swipeview.qml b/tests/auto/extras/data/tst_swipeview.qml
index 77800fab..6ec71acc 100644
--- a/tests/auto/extras/data/tst_swipeview.qml
+++ b/tests/auto/extras/data/tst_swipeview.qml
@@ -60,15 +60,6 @@ TestCase {
Text { }
}
- function test_defaults() {
- var control = swipeView.createObject(testCase)
- verify(control)
- compare(control.count, 0)
- compare(control.currentIndex, -1)
- compare(control.currentItem, null)
- control.destroy()
- }
-
function test_current() {
var control = swipeView.createObject(testCase)