tst_QRE::wildcard(): use more informative data row tags

Using simply the pattern didn't work so well when some patters are
used repeatedly, on different haystacks. So include the haystack
in the tag name. Remove one straight up duplicate row.

Change-Id: Ib46364581f23c493e83d75e6d04ab09e4329a3a5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
bb10
Edward Welbourne 2022-10-05 12:32:35 +02:00
parent 042702d961
commit 167da771f6
1 changed files with 1 additions and 2 deletions

View File

@ -2449,14 +2449,13 @@ void tst_QRegularExpression::wildcard_data()
QTest::addColumn<qsizetype>("foundIndex");
auto addRow = [](const char *pattern, const char *string, qsizetype foundIndex) {
QTest::newRow(pattern) << pattern << string << foundIndex;
QTest::addRow("%s@%s", pattern, string) << pattern << string << foundIndex;
};
addRow("*.html", "test.html", 0);
addRow("*.html", "test.htm", -1);
addRow("*bar*", "foobarbaz", 0);
addRow("*", "Qt Rocks!", 0);
addRow("*.html", "test.html", 0);
addRow("*.h", "test.cpp", -1);
addRow("*.???l", "test.html", 0);
addRow("*?", "test.html", 0);