summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-02-22 17:27:25 -0800
committerThiago Macieira <thiago.macieira@intel.com>2023-02-23 10:33:39 -0800
commite836c4776fd74d9f48997f5c9314f204709e2cf1 (patch)
tree0746e41a8771e4f503f20459fb5af2026bae3273
parent644c06b48f45aeabcd594df4dcf25a44ea02f132 (diff)
tst_qmessagehandler: fix QtTest warnings about duplicate row names
Pick-to: 6.5 Change-Id: Ieec322d73c1e40ad95c8fffd17464fcb2ca96f5f Reviewed-by: Kai Köhne <kai.koehne@qt.io>
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 7e2f9e3838..665da3ff22 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -168,9 +168,13 @@ public:
int operator%(int) { ADD("TestClass1::operator%"); return 0; }
int x;
int &operator++() { ADD("TestClass1::operator++"); return x; }
- int operator++(int) { ADD("TestClass1::operator++"); return 0; }
int &operator--() { ADD("TestClass1::operator--"); return x; }
- int operator--(int) { ADD("TestClass1::operator--"); return 0; }
+
+ // slightly different to avoid duplicate test rows
+#define ADD2(x) QTest::newRow(x ".postfix") << Q_FUNC_INFO << x;
+ int operator++(int) { ADD2("TestClass1::operator++"); return 0; }
+ int operator--(int) { ADD2("TestClass1::operator--"); return 0; }
+#undef ADD2
int nested_struct()
{
@@ -532,7 +536,7 @@ void tst_qmessagehandler::cleanupFuncinfo_data()
QTest::newRow("msvc_28")
<< "class std::map<long,void const *,struct std::less<long>,class std::allocator<struct std::pair<long const ,void const *> > > *__thiscall TestClass2<class std::map<long,void const *,struct std::less<long>,class std::allocator<struct std::pair<long const ,void const *> > > >::func_template1<class TestClass2<class std::map<long,void const *,struct std::less<long>,class std::allocator<struct std::pair<long const ,void const *> > > >>(void)"
<< "TestClass2::func_template1";
- QTest::newRow("gcc_21")
+ QTest::newRow("gcc_28")
<< "T* TestClass2<T>::func_template1() [with S = TestClass2<std::map<long int, const void*, std::less<long int>, std::allocator<std::pair<const long int, const void*> > > >, T = std::map<long int, const void*, std::less<long int>, std::allocator<std::pair<const long int, const void*> > >]"
<< "TestClass2::func_template1";