diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-10-05 14:59:52 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-10-17 15:53:32 +0200 |
commit | 0d915623ecef9d81f25c3891101b68384331233d (patch) | |
tree | 6234c512cd54bf7ec945ea7fd440e80e17f40f58 /tests/auto/corelib/tools | |
parent | ce950bcbf7f6cf3bd5bf5113e7b70016f0d60492 (diff) |
tst_QAlgorithms: fix misleading indent in data table
A violation of coding style (requiring braces on multi-line bodies
of conditionals) was accompanied by a mis-indented else block.
Fix a long line while I'm about it.
Change-Id: Ibe9cf15eadbe9ef58138d7876e5e2c5a14a92fd4
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r-- | tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp index 7e1cd8dcf1..0ac0b7cd13 100644 --- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp +++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp @@ -253,19 +253,22 @@ void tst_QAlgorithms::popCount_data_impl(size_t sizeof_T_Int) } // and some random ones: - if (sizeof_T_Int >= 8) + if (sizeof_T_Int >= 8) { for (size_t i = 0; i < 1000; ++i) { const quint64 input = QRandomGenerator::global()->generate64(); QTest::addRow("0x%016llx", input) << input << bitsSetInInt64(input); } - else if (sizeof_T_Int >= 2) - for (size_t i = 0; i < 1000 ; ++i) { - const quint32 input = QRandomGenerator::global()->generate(); - if (sizeof_T_Int >= 4) - QTest::addRow("0x%08x", input) << quint64(input) << bitsSetInInt(input); - else - QTest::addRow("0x%04x", quint16(input & 0xFFFF)) << quint64(input & 0xFFFF) << bitsSetInShort(input & 0xFFFF); + } else if (sizeof_T_Int >= 2) { + for (size_t i = 0; i < 1000 ; ++i) { + const quint32 input = QRandomGenerator::global()->generate(); + if (sizeof_T_Int >= 4) { + QTest::addRow("0x%08x", input) << quint64(input) << bitsSetInInt(input); + } else { + QTest::addRow("0x%04x", quint16(input & 0xFFFF)) + << quint64(input & 0xFFFF) << bitsSetInShort(input & 0xFFFF); } + } + } } template <typename T_Int> |