From 1ab5777f43ea58c645c632bda4bff4a429e95f00 Mon Sep 17 00:00:00 2001 From: Vladimir Belyavsky Date: Sun, 26 Nov 2023 11:34:18 +0300 Subject: [PATCH] tst_frame: 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: I3c21ea2a20a4443c1ae3e053e678a01901868970 Reviewed-by: Mitch Curtis (cherry picked from commit fba25cca22ac02e76e33cb483aff74b6a0920b13) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 2038289803ef5344e14d96aa8eb325f4fc3150ee) --- tests/auto/quickcontrols/controls/data/tst_frame.qml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/auto/quickcontrols/controls/data/tst_frame.qml b/tests/auto/quickcontrols/controls/data/tst_frame.qml index bef46f7650..5a6ce64bc1 100644 --- a/tests/auto/quickcontrols/controls/data/tst_frame.qml +++ b/tests/auto/quickcontrols/controls/data/tst_frame.qml @@ -52,10 +52,12 @@ TestCase { } } - function test_empty() { + function init() { failOnWarning(/.?/) + } - var control = createTemporaryObject(frame, testCase) + function test_empty() { + let control = createTemporaryObject(frame, testCase) verify(control) verify(control.contentItem) @@ -66,7 +68,7 @@ TestCase { } function test_oneChild() { - var control = createTemporaryObject(oneChildFrame, testCase) + let control = createTemporaryObject(oneChildFrame, testCase) verify(control) compare(control.contentWidth, 100) @@ -78,7 +80,7 @@ TestCase { } function test_twoChildren() { - var control = createTemporaryObject(twoChildrenFrame, testCase) + let control = createTemporaryObject(twoChildrenFrame, testCase) verify(control) compare(control.contentWidth, 0) @@ -90,7 +92,7 @@ TestCase { } function test_contentItem() { - var control = createTemporaryObject(contentFrame, testCase) + let control = createTemporaryObject(contentFrame, testCase) verify(control) compare(control.contentWidth, 100)