From 7b1254b00997b07aaf4daff35934c7c4c43971ca Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 7 Sep 2021 13:44:29 +0200 Subject: Tidy up in counting, skip and skipinit selftests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Minor clean-up. Split two long lines and added braces, called for by Qt coding style. Turned some QDebug("this line should never be reached...") into QFAIL(); that should make the effor a bit more prominent if it ever happens. Likewise for a qDebug() << "ERROR: ..." for code not meant to run. Change-Id: I1d34fe202f269eb3ad8f58feaabed809e4fec99c Reviewed-by: Tor Arne Vestbø Reviewed-by: Ievgenii Meshcheriakov --- tests/auto/testlib/selftests/counting/tst_counting.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/auto/testlib/selftests/counting') diff --git a/tests/auto/testlib/selftests/counting/tst_counting.cpp b/tests/auto/testlib/selftests/counting/tst_counting.cpp index ed48c88283..0831f88005 100644 --- a/tests/auto/testlib/selftests/counting/tst_counting.cpp +++ b/tests/auto/testlib/selftests/counting/tst_counting.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -217,10 +217,13 @@ void tst_Counting::testFailFail() void tst_Counting::init() { - if (strcmp(QTest::currentTestFunction(), "testFailInInit") == 0 && strcmp(QTest::currentDataTag(), "fail") == 0) + if (strcmp(QTest::currentTestFunction(), "testFailInInit") == 0 + && strcmp(QTest::currentDataTag(), "fail") == 0) { QFAIL("Fail in init()"); - else if (strcmp(QTest::currentTestFunction(), "testSkipInInit") == 0 && strcmp(QTest::currentDataTag(), "skip") == 0) + } else if (strcmp(QTest::currentTestFunction(), "testSkipInInit") == 0 + && strcmp(QTest::currentDataTag(), "skip") == 0) { QSKIP("Skip in init()"); + } } void tst_Counting::cleanup() -- cgit v1.2.3