diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2021-09-07 13:44:29 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2021-09-09 20:42:35 +0200 |
commit | 7b1254b00997b07aaf4daff35934c7c4c43971ca (patch) | |
tree | 1cf293300692201234207c737e3f9aada61adfb7 /tests/auto/testlib/selftests/counting | |
parent | 16b11bb81eb02f182e3570c9241f57c5689fb90e (diff) |
Tidy up in counting, skip and skipinit selftests
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ø <tor.arne.vestbo@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/counting')
-rw-r--r-- | tests/auto/testlib/selftests/counting/tst_counting.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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() |