From 64daf773afff7dbe440621a57f015d985e41f84a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 5 Dec 2024 11:39:53 +0100 Subject: [PATCH] tst_QString: extend arg() tests with unscoped enums Task-number: QTBUG-131906 Pick-to: 6.8 6.5 Change-Id: Icdd647bf6a36ad11e6e19786121d25392b53236c Reviewed-by: Ivan Solovev --- tests/auto/corelib/text/qstring/tst_qstring.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp index f8ed057c248..11e2232133d 100644 --- a/tests/auto/corelib/text/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp @@ -6694,6 +6694,13 @@ 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 }; + QEXPECT_FAIL("", "QTBUG-131906", Continue); // Qt 6.9 only + 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]"));