aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickcontrols/controls/data/tst_radiodelegate.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quickcontrols/controls/data/tst_radiodelegate.qml')
-rw-r--r--tests/auto/quickcontrols/controls/data/tst_radiodelegate.qml26
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/auto/quickcontrols/controls/data/tst_radiodelegate.qml b/tests/auto/quickcontrols/controls/data/tst_radiodelegate.qml
index fe89838bda..fc6d93886f 100644
--- a/tests/auto/quickcontrols/controls/data/tst_radiodelegate.qml
+++ b/tests/auto/quickcontrols/controls/data/tst_radiodelegate.qml
@@ -1,5 +1,5 @@
// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtTest
@@ -20,16 +20,18 @@ TestCase {
// TODO: data-fy tst_radiobutton (rename to tst_radio?) so we don't duplicate its tests here?
- function test_defaults() {
+ function init() {
failOnWarning(/.?/)
+ }
- var control = createTemporaryObject(radioDelegate, testCase);
+ function test_defaults() {
+ let control = createTemporaryObject(radioDelegate, testCase);
verify(control);
verify(!control.checked);
}
function test_checked() {
- var control = createTemporaryObject(radioDelegate, testCase);
+ let control = createTemporaryObject(radioDelegate, testCase);
verify(control);
mouseClick(control);
@@ -40,17 +42,17 @@ TestCase {
}
function test_baseline() {
- var control = createTemporaryObject(radioDelegate, testCase);
+ let control = createTemporaryObject(radioDelegate, testCase);
verify(control);
compare(control.baselineOffset, control.contentItem.y + control.contentItem.baselineOffset);
}
function test_spacing() {
- var control = createTemporaryObject(radioDelegate, testCase, { text: "Some long, long, long text" })
+ let control = createTemporaryObject(radioDelegate, testCase, { text: "Some long, long, long text" })
verify(control)
verify(control.contentItem.implicitWidth + control.leftPadding + control.rightPadding > control.background.implicitWidth)
- var textLabel = findChild(control.contentItem, "label")
+ let textLabel = findChild(control.contentItem, "label")
verify(textLabel)
// The implicitWidth of the IconLabel that all buttons use as their contentItem should be
@@ -77,7 +79,7 @@ TestCase {
}
function test_display(data) {
- var control = createTemporaryObject(radioDelegate, testCase, {
+ let control = createTemporaryObject(radioDelegate, testCase, {
text: "RadioDelegate",
display: data.display,
width: 400,
@@ -87,11 +89,11 @@ TestCase {
verify(control)
compare(control.icon.source, "qrc:/qt-project.org/imports/QtQuick/Controls/Basic/images/check.png")
- var iconImage = findChild(control.contentItem, "image")
- var textLabel = findChild(control.contentItem, "label")
+ let iconImage = findChild(control.contentItem, "image")
+ let textLabel = findChild(control.contentItem, "label")
- var availableWidth = control.availableWidth - control.indicator.width - control.spacing
- var indicatorOffset = control.mirrored ? control.indicator.width + control.spacing : 0
+ let availableWidth = control.availableWidth - control.indicator.width - control.spacing
+ let indicatorOffset = control.mirrored ? control.indicator.width + control.spacing : 0
switch (control.display) {
case RadioDelegate.IconOnly: