tst_busyindicator: fail on warnings

Enable fail on warnings for all tests in init() method.
Also, as a drive-by change, replace 'var' with 'let'

Task-number: QTBUG-98718
Change-Id: I04f16ce3e3cc383ce35cab12b8fdc7e2108587eb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 27efcaa345)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit af939b3743)
This commit is contained in:
Vladimir Belyavsky 2023-11-20 20:48:41 +03:00 committed by Qt Cherry-pick Bot
parent 69257e46ac
commit 4448a13f05
1 changed files with 7 additions and 5 deletions

View File

@ -23,16 +23,18 @@ TestCase {
MouseArea { }
}
function test_defaults() {
function init() {
failOnWarning(/.?/)
}
function test_defaults() {
let control = createTemporaryObject(busyIndicator, testCase)
verify(control)
compare(control.running, true)
}
function test_running() {
var control = createTemporaryObject(busyIndicator, testCase)
let control = createTemporaryObject(busyIndicator, testCase)
verify(control)
compare(control.running, true)
@ -42,10 +44,10 @@ TestCase {
// QTBUG-61785
function test_mouseArea() {
var ma = createTemporaryObject(mouseArea, testCase, {width: testCase.width, height: testCase.height})
let ma = createTemporaryObject(mouseArea, testCase, {width: testCase.width, height: testCase.height})
verify(ma)
var control = busyIndicator.createObject(ma, {width: testCase.width, height: testCase.height})
let control = busyIndicator.createObject(ma, {width: testCase.width, height: testCase.height})
verify(control)
mousePress(control)
@ -54,7 +56,7 @@ TestCase {
mouseRelease(control)
verify(!ma.pressed)
var touch = touchEvent(control)
let touch = touchEvent(control)
touch.press(0, control).commit()
verify(ma.pressed)