qt5base-lts/tests/auto/corelib
Edward Welbourne 2b16997116 Clean up tst_QSettings::testVariantTypes()
Give the macro and its parameters clearer names, wrap the macro body
in do {...} while (0), use QCOMPARE() rather than QVERIFY()ing
comparisons, convert the result type to QMetaType::Type rather than
QVariant's deprecated equivalent, save one macro parameter by using
decltype() on another. Simplify one check by pulling out a common
sub-expression as a local variable.

In the process, give the settings keys meaningful names rather than
just "key" with a numeric suffix.

Ideally this test would be reworked to be data-driven, instead of
using macros, but the use of qvariant_cast<> to convert a read-back
value, along with the variable type of the input value compared to the
result of that cast, precludes this (as far as I can see).

Change-Id: I4e083cd0dea14d723910873829352e15740006bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-26 15:10:15 +02:00
..
animation tst_qanimationgroup: fix memleaks 2022-01-05 08:22:00 +01:00
global Move some purely floating-point testing from tst_QLocale to tst_QNumeric 2022-04-01 23:11:35 +02:00
io Clean up tst_QSettings::testVariantTypes() 2022-04-26 15:10:15 +02:00
itemmodels QAbstractProxyModel: do not access invalid indexes 2022-04-13 18:08:38 +02:00
kernel Clean up includes involving tst_qmetatype_common.h 2022-04-26 15:10:15 +02:00
mimetypes Tests: Do not depend on transitive includes 2022-03-17 17:14:37 +01:00
platform Android: Add runOnMainAndroidThread() under QNativeInterface 2021-05-26 23:24:11 +00:00
plugin Android: activate tst_QPluginLoader 2022-03-30 19:05:59 +02:00
serialization Skip test that fails with Address Sanitizer enabled 2022-04-12 00:48:17 +02:00
text tst_qstringapisymmetry: check toInt() etc also with base != 0 2022-04-17 21:55:23 +02:00
thread Add support for unwrapping QFuture<QFuture<T>> 2022-04-21 20:25:13 +00:00
time QDate(Time): add a addDuration method 2022-04-14 21:56:56 +02:00
tools QVarLengthArray: add missing (size, value) ctor 2022-04-13 08:10:47 +02:00
CMakeLists.txt Add tests for QAndroidApplication's sdkVersion and activity 2021-05-13 01:41:36 +03:00