tst_QString: extend arg() tests with unscoped enums
Conflict resolution for 6.8: - remove the QEXCEPT_FAIL - 6.8 was never affected Task-number: QTBUG-131906 Pick-to: 6.5 Change-Id: Icdd647bf6a36ad11e6e19786121d25392b53236c Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 64daf773afff7dbe440621a57f015d985e41f84a)
This commit is contained in:
parent
2e6490aa47
commit
8a270b35fe
@ -6685,6 +6685,12 @@ void tst_QString::arg()
|
||||
QCOMPARE( s4.arg(Q_UINT64_C(9223372036854775808)), // LLONG_MAX + 1
|
||||
QLatin1String("[9223372036854775808]") );
|
||||
|
||||
// (unscoped) enums
|
||||
enum : int { FooS = -1 };
|
||||
enum : uint { FooU = 1 };
|
||||
QCOMPARE(s4.arg(FooS), QLatin1String("[-1]"));
|
||||
QCOMPARE(s4.arg(FooU), QLatin1String("[1]"));
|
||||
|
||||
// FP overloads
|
||||
QCOMPARE(s4.arg(2.25), QLatin1String("[2.25]"));
|
||||
QCOMPARE(s4.arg(3.75f), QLatin1String("[3.75]"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user