summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2012-02-14 13:03:16 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-15 02:36:47 +0100
commit1acc490248655d7a2db5835f6f9ac0c68d6df454 (patch)
tree64c3e560163a1c5936e821766971e5293fbb4357
parent22e0060e596c73e614f88f1269893214cf24bf6a (diff)
Eliminate duplicate data row names in widgets autotests.
Change-Id: I82bab3cc39320014fac6732c7b60233b262cb30d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp46
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp3
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp10
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp14
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp12
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp21
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp54
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp14
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp4
-rw-r--r--tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp8
-rw-r--r--tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp4
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp2
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp69
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp32
-rw-r--r--tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp2
18 files changed, 152 insertions, 149 deletions
diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
index ea4eed54d2..8724bf63c8 100644
--- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -240,6 +240,9 @@ void tst_QFileSystemModel::naturalCompare_data()
QTest::addColumn<int>("caseSensitive");
QTest::addColumn<int>("result");
QTest::addColumn<int>("swap");
+
+#define ROWNAME(name) (qPrintable(QString("prefix=%1, postfix=%2, num=%3, i=%4, test=%5").arg(prefix).arg(postfix).arg(num).arg(i).arg(name)))
+
for (int j = 0; j < 4; ++j) { // <- set a prefix and a postfix string (not numbers)
QString prefix = (j == 0 || j == 1) ? "b" : "";
QString postfix = (j == 1 || j == 2) ? "y" : "";
@@ -248,32 +251,33 @@ void tst_QFileSystemModel::naturalCompare_data()
QString num = QString("%1").arg(k);
QString nump = QString("%1").arg(k + 1);
for (int i = 10; i < 12; ++i) { // <- swap s1 and s2 and reverse the result
- QTest::newRow("basic") << prefix + "0" + postfix << prefix + "0" + postfix << int(Qt::CaseInsensitive) << 0;
+ QTest::newRow(ROWNAME("basic")) << prefix + "0" + postfix << prefix + "0" + postfix << int(Qt::CaseInsensitive) << 0;
// s1 should always be less then s2
- QTest::newRow("just text") << prefix + "fred" + postfix << prefix + "jane" + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("just numbers") << prefix + num + postfix << prefix + "9" + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("zero") << prefix + num + postfix << prefix + "0" + nump + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("space b") << prefix + num + postfix << prefix + " " + nump + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("space a") << prefix + num + postfix << prefix + nump + " " + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("tab b") << prefix + num + postfix << prefix + " " + nump + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("tab a") << prefix + num + postfix << prefix + nump + " " + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("10 vs 2") << prefix + num + postfix << prefix + "10" + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("diff len") << prefix + num + postfix << prefix + nump + postfix + "x" << int(Qt::CaseInsensitive) << i;
- QTest::newRow("01 before 1") << prefix + "0" + num + postfix << prefix + nump + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("mul nums 2nd") << prefix + "1-" + num + postfix << prefix + "1-" + nump + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("mul nums 2nd") << prefix + "10-" + num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("mul nums 2nd") << prefix + "10-0"+ num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("mul nums 2nd") << prefix + "10-" + num + postfix<< prefix + "10-010" + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("mul nums big") << prefix + "10-" + num + postfix<< prefix + "20-0" + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("mul nums big") << prefix + "2-" + num + postfix << prefix + "10-0" + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("mul alphabet") << prefix + num + "-a" + postfix << prefix + num + "-c" + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("mul alphabet2")<< prefix + num + "-a9" + postfix<< prefix + num + "-c0" + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("mul nums w\\0")<< prefix + num + "-"+ num + postfix<< prefix + num+"-0"+nump + postfix << int(Qt::CaseInsensitive) << i;
- QTest::newRow("num first") << prefix + num + postfix << prefix + "a" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("just text")) << prefix + "fred" + postfix << prefix + "jane" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("just numbers")) << prefix + num + postfix << prefix + "9" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("zero")) << prefix + num + postfix << prefix + "0" + nump + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("space b")) << prefix + num + postfix << prefix + " " + nump + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("space a")) << prefix + num + postfix << prefix + nump + " " + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("tab b")) << prefix + num + postfix << prefix + " " + nump + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("tab a")) << prefix + num + postfix << prefix + nump + " " + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("10 vs 2")) << prefix + num + postfix << prefix + "10" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("diff len")) << prefix + num + postfix << prefix + nump + postfix + "x" << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("01 before 1")) << prefix + "0" + num + postfix << prefix + nump + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("mul nums 2nd 1")) << prefix + "1-" + num + postfix << prefix + "1-" + nump + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("mul nums 2nd 2")) << prefix + "10-" + num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("mul nums 2nd 3")) << prefix + "10-0"+ num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("mul nums 2nd 4")) << prefix + "10-" + num + postfix<< prefix + "10-010" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("mul nums big 1")) << prefix + "10-" + num + postfix<< prefix + "20-0" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("mul nums big 2")) << prefix + "2-" + num + postfix << prefix + "10-0" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("mul alphabet 1")) << prefix + num + "-a" + postfix << prefix + num + "-c" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("mul alphabet 2")) << prefix + num + "-a9" + postfix<< prefix + num + "-c0" + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("mul nums w\\0")) << prefix + num + "-"+ num + postfix<< prefix + num+"-0"+nump + postfix << int(Qt::CaseInsensitive) << i;
+ QTest::newRow(ROWNAME("num first")) << prefix + num + postfix << prefix + "a" + postfix << int(Qt::CaseInsensitive) << i;
}
}
}
+#undef ROWNAME
}
void tst_QFileSystemModel::naturalCompare()
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index bbe7062507..51ce7f909c 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -454,7 +454,6 @@ void tst_QGraphicsGridLayout::addItem_data()
for (int b = -1; b < 2; ++b) {
for (int c = -1; c < 2; ++c) {
for (int d = -1; d < 2; ++d) {
- for (int e = 0; e < 9; ++e) {
int row = a;
int column = b;
int rowSpan = c;
@@ -462,7 +461,7 @@ void tst_QGraphicsGridLayout::addItem_data()
QString name = QString::fromAscii("(%1,%2,%3,%4").arg(a).arg(b).arg(c).arg(d);
Qt::Alignment alignment = Qt::AlignLeft;
QTest::newRow(name.toLatin1()) << row << column << rowSpan << columnSpan << alignment;
- }}}}}
+ }}}}
}
// public void addItem(QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = 0)
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index 4089768e7a..4dd57e1b90 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -2365,16 +2365,16 @@ void tst_QHeaderView::setupTestData(bool also_use_reset_model)
QTest::addColumn<bool>("reset_model");
if (also_use_reset_model) {
- QTest::newRow("no_updates+normal") << false << false << true;
- QTest::newRow("hasupdates+normal") << true << false << true;
- QTest::newRow("no_updates+special") << false << true << true;
- QTest::newRow("no_updates+special") << true << true << true;
+ QTest::newRow("no_updates+normal+reset") << false << false << true;
+ QTest::newRow("hasupdates+normal+reset") << true << false << true;
+ QTest::newRow("no_updates+special+reset") << false << true << true;
+ QTest::newRow("hasupdates+special+reset") << true << true << true;
}
QTest::newRow("no_updates+normal") << false << false << false;
QTest::newRow("hasupdates+normal") << true << false << false;
QTest::newRow("no_updates+special") << false << true << false;
- QTest::newRow("no_updates+special") << true << true << false;
+ QTest::newRow("hasupdates+special") << true << true << false;
}
void tst_QHeaderView::additionalInit()
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 523516a4b4..f139eac275 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -970,7 +970,7 @@ void tst_QListView::selection_data()
<< QRect(300, 10, 1, 1) // selection rectangle
<< IntList(); // expected items
- QTest::newRow("select to the right, (on viewport)")
+ QTest::newRow("select to the right 2, (on viewport)")
<< 40 // itemCount
<< int(QListView::ListMode)
<< int(QListView::TopToBottom)
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index 586c2efd8f..9144a023d7 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -1204,7 +1204,7 @@ void tst_QTableView::moveCursorStrikesBack_data()
<< 0 << 5 << (IntList() << int(QtTestTableView::MoveNext))
<< 1 << 0;
- QTest::newRow("Last column disabled. Task QTBUG-3878") << -1 << -1
+ QTest::newRow("Last column disabled 2. Task QTBUG-3878") << -1 << -1
<< IntList()
<< (IntList() << 6)
<< QRect()
diff --git a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
index 0e518b3e16..14c61c7932 100644
--- a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
+++ b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
@@ -1014,13 +1014,13 @@ void tst_QTreeWidgetItemIterator::minus_eq_data()
QTest::addColumn<int>("iteratorflags");
QTest::addColumn<QString>("expecteditem");
- QTest::newRow("-=0") << 0 << 0 << (int)QTreeWidgetItemIterator::All << QString("top0");
- QTest::newRow("-=1") << 2 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0");
- QTest::newRow("-=2") << 4 << 2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1");
- QTest::newRow("-=(-1)") << 0 << -1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0");
- QTest::newRow("-=(-2)") << 0 << -2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1");
- QTest::newRow("-=1)") << 18 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child16");
- QTest::newRow("-=1)") << 1 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0");
+ QTest::newRow("0-=0") << 0 << 0 << (int)QTreeWidgetItemIterator::All << QString("top0");
+ QTest::newRow("2-=1") << 2 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0");
+ QTest::newRow("4-=2") << 4 << 2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1");
+ QTest::newRow("0-=(-1)") << 0 << -1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0");
+ QTest::newRow("0-=(-2)") << 0 << -2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1");
+ QTest::newRow("18-=1") << 18 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child16");
+ QTest::newRow("1-=1") << 1 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0");
}
void tst_QTreeWidgetItemIterator::minus_eq()
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index d9f4081ed3..7017c6157e 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -380,16 +380,16 @@ void tst_QApplication::setFont_data()
++cnt;
}
- QTest::newRow("nonexistingfont") << "nosuchfont_probably_quiteunlikely"
+ QTest::newRow("nonexistingfont after") << "nosuchfont_probably_quiteunlikely"
<< 0 << false;
- QTest::newRow("nonexistingfont") << "nosuchfont_probably_quiteunlikely"
+ QTest::newRow("nonexistingfont before") << "nosuchfont_probably_quiteunlikely"
<< 0 << true;
- QTest::newRow("largescaleable") << "smoothtimes" << 100 << false;
- QTest::newRow("largescaleable") << "smoothtimes" << 100 << true;
+ QTest::newRow("largescaleable after") << "smoothtimes" << 100 << false;
+ QTest::newRow("largescaleable before") << "smoothtimes" << 100 << true;
- QTest::newRow("largeunscaleale") << "helvetica" << 100 << false;
- QTest::newRow("largeunscaleale") << "helvetica" << 100 << true;
+ QTest::newRow("largeunscaleale after") << "helvetica" << 100 << false;
+ QTest::newRow("largeunscaleale before") << "helvetica" << 100 << true;
}
void tst_QApplication::setFont()
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index c8e5591f8b..c43ea065f3 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -797,6 +797,16 @@ void tst_QGridLayout::minMaxSize_data()
<< SizeInfo(QPoint(10, 10), QSize( 90, 90), QSize(100,100))
<< SizeInfo(QPoint(10 + 100 + 1, 10), QSize( 90, 90))
);
+ QTest::newRow("2x1 grid, extend to minimumSize, motif") << QString::fromAscii("motif") << 2 << 1
+ << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList()
+ << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100))
+ << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90))
+ );
+ QTest::newRow("2x1 grid, extend to minimumSize, windows") << QString::fromAscii("windows") << 2 << 1
+ << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList()
+ << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100))
+ << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90))
+ );
QTest::newRow("1x2 grid, extend to minimumSize") << QString() << 1 << 2
<< int(QSizePolicy::Preferred) << QSize() << (SizeInfoList()
<< SizeInfo(QPoint(10, 10), QSize( 90, 90), QSize(100,100))
@@ -818,17 +828,6 @@ void tst_QGridLayout::minMaxSize_data()
<< SizeInfo(QPoint(10, 10 + 100 + 1), QSize(100,100), QSize(), QSize(), 100*100)
<< SizeInfo(QPoint(10, 10 + 100 + 1 + 50 + 1), QSize(100,100), QSize(), QSize(100, 100))
);
- QTest::newRow("2x1 grid, extend to minimumSize") << QString::fromAscii("motif") << 2 << 1
- << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList()
- << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100))
- << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90))
- );
- QTest::newRow("2x1 grid, extend to minimumSize") << QString::fromAscii("windows") << 2 << 1
- << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList()
- << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100))
- << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90))
- );
-
}
void tst_QGridLayout::minMaxSize()
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
index 228ff40ee5..a257eb1798 100644
--- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
@@ -367,40 +367,42 @@ void tst_QCompleter::csMatchingOnCsSortedModel_data()
QTest::addColumn<QString>("completion");
QTest::addColumn<QString>("completionText");
+#define ROWNAME(name) (qPrintable(QString("%1 %2").arg(name).arg(i)))
+
for (int i = 0; i < 2; i++) {
if (i == 1)
QTest::newRow("FILTERING_OFF") << "FILTERING_OFF" << "" << "" << "";
// Plain text filter
- QTest::newRow("()") << "" << "" << "P0" << "P0";
- QTest::newRow("()F") << "" << "F" << "P0" << "P0";
- QTest::newRow("()L") << "" << "L" << "p4" << "p4";
- QTest::newRow("()L") << "" << "L" << "p4" << "p4";
- QTest::newRow("()N") << "" << "N" << "P1" << "P1";
- QTest::newRow("(P)") << "P" << "" << "P0" << "P0";
- QTest::newRow("(P)F") << "P" << "" << "P0" << "P0";
- QTest::newRow("(P)L") << "P" << "L" << "P4" << "P4";
- QTest::newRow("(p)") << "p" << "" << "p0" << "p0";
- QTest::newRow("(p)N") << "p" << "N" << "p1" << "p1";
- QTest::newRow("(p)NN") << "p" << "NN" << "p2" << "p2";
- QTest::newRow("(p)NNN") << "p" << "NNN" << "p3" << "p3";
- QTest::newRow("(p)NNNN") << "p" << "NNNN" << "p4" << "p4";
- QTest::newRow("(p1)") << "p1" << "" << "p1" << "p1";
- QTest::newRow("(p11)") << "p11" << "" << "" << "";
+ QTest::newRow(ROWNAME("()")) << "" << "" << "P0" << "P0";
+ QTest::newRow(ROWNAME("()F")) << "" << "F" << "P0" << "P0";
+ QTest::newRow(ROWNAME("()L")) << "" << "L" << "p4" << "p4";
+ QTest::newRow(ROWNAME("()N")) << "" << "N" << "P1" << "P1";
+ QTest::newRow(ROWNAME("(P)")) << "P" << "" << "P0" << "P0";
+ QTest::newRow(ROWNAME("(P)F")) << "P" << "" << "P0" << "P0";
+ QTest::newRow(ROWNAME("(P)L")) << "P" << "L" << "P4" << "P4";
+ QTest::newRow(ROWNAME("(p)")) << "p" << "" << "p0" << "p0";
+ QTest::newRow(ROWNAME("(p)N")) << "p" << "N" << "p1" << "p1";
+ QTest::newRow(ROWNAME("(p)NN")) << "p" << "NN" << "p2" << "p2";
+ QTest::newRow(ROWNAME("(p)NNN")) << "p" << "NNN" << "p3" << "p3";
+ QTest::newRow(ROWNAME("(p)NNNN")) << "p" << "NNNN" << "p4" << "p4";
+ QTest::newRow(ROWNAME("(p1)")) << "p1" << "" << "p1" << "p1";
+ QTest::newRow(ROWNAME("(p11)")) << "p11" << "" << "" << "";
// Tree filter
- QTest::newRow("(P0,)") << "P0," << "" << "c0P0" << "P0,c0P0";
- QTest::newRow("(P0,c)") << "P0,c" << "" << "c0P0" << "P0,c0P0";
- QTest::newRow("(P0,c1)") << "P0,c1" << "" << "c1P0" << "P0,c1P0";
- QTest::newRow("(P0,c3P0)") << "P0,c3P0" << "" << "c3P0" << "P0,c3P0";
- QTest::newRow("(P3,c)F") << "P3,c" << "F" << "c0P3" << "P3,c0P3";
- QTest::newRow("(P3,c)L") << "P3,c" << "L" << "c4P3" << "P3,c4P3";
- QTest::newRow("(P3,c)N") << "P3,c" << "N" << "c1P3" << "P3,c1P3";
- QTest::newRow("(P3,c)NN") << "P3,c" << "NN" << "c2P3" << "P3,c2P3";
- QTest::newRow("(P3,,c)") << "P3,,c" << "" << "" << "";
- QTest::newRow("(P3,c0P3,)") << "P3,c0P3," << "" << "" << "";
- QTest::newRow("(P,)") << "P," << "" << "" << "";
+ QTest::newRow(ROWNAME("(P0,)")) << "P0," << "" << "c0P0" << "P0,c0P0";
+ QTest::newRow(ROWNAME("(P0,c)")) << "P0,c" << "" << "c0P0" << "P0,c0P0";
+ QTest::newRow(ROWNAME("(P0,c1)")) << "P0,c1" << "" << "c1P0" << "P0,c1P0";
+ QTest::newRow(ROWNAME("(P0,c3P0)")) << "P0,c3P0" << "" << "c3P0" << "P0,c3P0";
+ QTest::newRow(ROWNAME("(P3,c)F")) << "P3,c" << "F" << "c0P3" << "P3,c0P3";
+ QTest::newRow(ROWNAME("(P3,c)L")) << "P3,c" << "L" << "c4P3" << "P3,c4P3";
+ QTest::newRow(ROWNAME("(P3,c)N")) << "P3,c" << "N" << "c1P3" << "P3,c1P3";
+ QTest::newRow(ROWNAME("(P3,c)NN")) << "P3,c" << "NN" << "c2P3" << "P3,c2P3";
+ QTest::newRow(ROWNAME("(P3,,c)")) << "P3,,c" << "" << "" << "";
+ QTest::newRow(ROWNAME("(P3,c0P3,)")) << "P3,c0P3," << "" << "" << "";
+ QTest::newRow(ROWNAME("(P,)")) << "P," << "" << "" << "";
}
+#undef ROWNAME
}
void tst_QCompleter::csMatchingOnCsSortedModel()
diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
index 5695834e61..85cd2a8d92 100644
--- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
+++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
@@ -229,13 +229,13 @@ void tst_QAbstractButton::onReleased()
void tst_QAbstractButton::setAutoRepeat_data()
{
QTest::addColumn<int>("mode");
- QTest::newRow( "" ) << 0;
- QTest::newRow( "" ) << 1;
- QTest::newRow( "" ) << 2;
- QTest::newRow( "" ) << 3;
- QTest::newRow( "" ) << 4;
- QTest::newRow( "" ) << 5;
- QTest::newRow( "" ) << 6;
+ QTest::newRow("mode 0") << 0;
+ QTest::newRow("mode 1") << 1;
+ QTest::newRow("mode 2") << 2;
+ QTest::newRow("mode 3") << 3;
+ QTest::newRow("mode 4") << 4;
+ QTest::newRow("mode 5") << 5;
+ QTest::newRow("mode 6") << 6;
}
#define REPEAT_DELAY 1000
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index 6ed5d59db0..6021f90ed4 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
@@ -482,7 +482,7 @@ void tst_QAbstractSlider::keyPressed_data()
QList<Qt::Key> list;
list << Qt::Key_Down;
- QTest::newRow("Step down once") << 10 // initial position
+ QTest::newRow("Step down once 1") << 10 // initial position
<< 0 // minimum
<< 100 // maximum
<< 3 // single step size
@@ -495,7 +495,7 @@ void tst_QAbstractSlider::keyPressed_data()
list = QList<Qt::Key>();
list << Qt::Key_Up;
- QTest::newRow("Step down once") << 10 // initial position
+ QTest::newRow("Step down once 2") << 10 // initial position
<< 0 // minimum
<< 100 // maximum
<< 3 // single step size
diff --git a/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp b/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
index deb8a3bb6f..474acc0a78 100644
--- a/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
+++ b/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
@@ -360,11 +360,11 @@ void tst_QDoubleValidator::validateIntEquiv_data()
QTest::newRow("4.6") << 0.0 << 10.0 << QString(".1") << INV;
QTest::newRow("4.7") << 0.0 << 10.0 << QString("-1.0") << INV;
- QTest::newRow("5.1") << 6.0 << 8.0 << QString("5") << ITM;
- QTest::newRow("5.1") << 6.0 << 8.0 << QString("56") << INV;
+ QTest::newRow("5.1a") << 6.0 << 8.0 << QString("5") << ITM;
+ QTest::newRow("5.1b") << 6.0 << 8.0 << QString("56") << INV;
QTest::newRow("5.2") << 6.0 << 8.0 << QString("7") << ACC;
- QTest::newRow("5.3") << 6.0 << 8.0 << QString("9") << ITM;
- QTest::newRow("5.3") << 6.0 << 8.0 << QString("-") << INV;
+ QTest::newRow("5.3a") << 6.0 << 8.0 << QString("9") << ITM;
+ QTest::newRow("5.3b") << 6.0 << 8.0 << QString("-") << INV;
QTest::newRow("5.4a") << -8.0 << -6.0 << QString("+") << INV;
QTest::newRow("5.4b") << -8.0 << -6.0 << QString("+5") << INV;
QTest::newRow("5.4c") << -8.0 << -6.0 << QString("-5") << ITM;
diff --git a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
index e773607164..3832d39d6f 100644
--- a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
+++ b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
@@ -256,7 +256,7 @@ void tst_QFontComboBox::writingSystem_data()
QTest::newRow("Runic") << QFontDatabase::Runic;
for (int i = 0; i < 31; ++i)
- QTest::newRow("enum") << (QFontDatabase::WritingSystem)i;
+ QTest::newRow(qPrintable(QString("enum %1").arg(i))) << (QFontDatabase::WritingSystem)i;
}
// public QFontDatabase::WritingSystem writingSystem() const
diff --git a/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp b/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
index 6aec414ae6..99d8ded15c 100644
--- a/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
+++ b/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
@@ -70,8 +70,8 @@ void tst_QIntValidator::validate_data()
QTest::newRow("data1") << 0 << 100 << QString("500") << INV;
QTest::newRow("data1a") << 0 << 100 << QString("5000") << INV;
QTest::newRow("data1b") << -100 << 0 << QString("50") << INT;
- QTest::newRow("data1b") << -100 << 0 << QString("500") << INV;
- QTest::newRow("data1c") << -100 << 0 << QString("5000") << INV;
+ QTest::newRow("data1c") << -100 << 0 << QString("500") << INV;
+ QTest::newRow("data1d") << -100 << 0 << QString("5000") << INV;
QTest::newRow("data2") << 0 << 100 << QString("-35") << INV;
QTest::newRow("data3") << 0 << 100 << QString("a") << INV;
QTest::newRow("data4") << 0 << 100 << QString("-") << INV;
diff --git a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
index 6d6b9384b9..d8b2a800b9 100644
--- a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
+++ b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
@@ -312,7 +312,7 @@ void tst_QLabel::eventPropagation_data()
QTest::newRow("rich text2") << QString("<b>rich text</b>") << (int)Qt::TextSelectableByKeyboard << (int)Qt::ClickFocus << true;
QTest::newRow("rich text3") << QString("<b>rich text</b>") << (int)Qt::TextSelectableByMouse << (int)Qt::ClickFocus << false;
QTest::newRow("rich text4") << QString("<b>rich text</b>") << (int)Qt::NoTextInteraction << (int)Qt::NoFocus << true;
- QTest::newRow("rich text4") << QString("<b>rich text</b>") << (int)Qt::LinksAccessibleByKeyboard << (int)Qt::StrongFocus << true;
+ QTest::newRow("rich text5") << QString("<b>rich text</b>") << (int)Qt::LinksAccessibleByKeyboard << (int)Qt::StrongFocus << true;
if (!test_box)
test_box = new Widget;
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index b004efd07c..645f47fc72 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -647,22 +647,21 @@ void tst_QLineEdit::inputMask_data()
QTest::addColumn<QString>("expectedMask");
// if no mask is set a nul string should be returned
- QTest::newRow("") << QString("") << QString();
- QTest::newRow("") << QString() << QString();
+ QTest::newRow("nul 1") << QString("") << QString();
+ QTest::newRow("nul 2") << QString() << QString();
// try different masks
- QTest::newRow("") << QString("000.000.000.000") << QString("000.000.000.000; ");
- QTest::newRow("") << QString("000.000.000.000;#") << QString("000.000.000.000;#");
- QTest::newRow("") << QString("AAA.aa.999.###;") << QString("AAA.aa.999.###; ");
- QTest::newRow("") << QString(">abcdef<GHIJK") << QString(">abcdef<GHIJK; ");
-// QTest::newRow("") << QString() << QString();
+ QTest::newRow("mask 1") << QString("000.000.000.000") << QString("000.000.000.000; ");
+ QTest::newRow("mask 2") << QString("000.000.000.000;#") << QString("000.000.000.000;#");
+ QTest::newRow("mask 3") << QString("AAA.aa.999.###;") << QString("AAA.aa.999.###; ");
+ QTest::newRow("mask 4") << QString(">abcdef<GHIJK") << QString(">abcdef<GHIJK; ");
// set an invalid input mask...
// the current behaviour is that this exact (faulty) string is returned.
- QTest::newRow("") << QString("ABCDEFGHIKLMNOP;") << QString("ABCDEFGHIKLMNOP; ");
+ QTest::newRow("invalid") << QString("ABCDEFGHIKLMNOP;") << QString("ABCDEFGHIKLMNOP; ");
// verify that we can unset the mask again
- QTest::newRow("") << QString("") << QString();
+ QTest::newRow("unset") << QString("") << QString();
}
void tst_QLineEdit::inputMask()
@@ -3441,32 +3440,32 @@ void tst_QLineEdit::task233101_cursorPosAfterInputMethod_data()
QTest::addColumn<int>("replacementLength");
QTest::addColumn<QString>("commitString");
- QTest::newRow("") << 4 << 4 << 0 << 0 << QString("");
- QTest::newRow("") << 4 << 4 << 0 << 0 << QString("x");
- QTest::newRow("") << 4 << 4 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
- QTest::newRow("") << 4 << 3 << 0 << 0 << QString("");
- QTest::newRow("") << 4 << 3 << 0 << 0 << QString("x");
- QTest::newRow("") << 4 << 3 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
- QTest::newRow("") << 4 << 0 << 0 << 0 << QString("");
- QTest::newRow("") << 4 << 0 << 0 << 0 << QString("x");
- QTest::newRow("") << 4 << 0 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
-
- QTest::newRow("") << 4 << 4 << -4 << 4 << QString("");
- QTest::newRow("") << 4 << 4 << -4 << 4 << QString("x");
- QTest::newRow("") << 4 << 4 << -4 << 4 << QString("xxxxxxxxxxxxxxxx");
- QTest::newRow("") << 4 << 3 << -3 << 4 << QString("");
- QTest::newRow("") << 4 << 3 << -3 << 4 << QString("x");
- QTest::newRow("") << 4 << 3 << -3 << 4 << QString("xxxxxxxxxxxxxxxx");
- QTest::newRow("") << 4 << 0 << 0 << 4 << QString("");
- QTest::newRow("") << 4 << 0 << 0 << 4 << QString("x");
- QTest::newRow("") << 4 << 0 << 0 << 4 << QString("xxxxxxxxxxxxxxxx");
-
- QTest::newRow("") << 4 << 4 << -4 << 0 << QString("");
- QTest::newRow("") << 4 << 4 << -4 << 0 << QString("x");
- QTest::newRow("") << 4 << 4 << -4 << 0 << QString("xxxxxxxxxxxxxxxx");
- QTest::newRow("") << 4 << 3 << -3 << 0 << QString("");
- QTest::newRow("") << 4 << 3 << -3 << 0 << QString("x");
- QTest::newRow("") << 4 << 3 << -3 << 0 << QString("xxxxxxxxxxxxxxxx");
+ QTest::newRow("data1") << 4 << 4 << 0 << 0 << QString("");
+ QTest::newRow("data2") << 4 << 4 << 0 << 0 << QString("x");
+ QTest::newRow("data3") << 4 << 4 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
+ QTest::newRow("data4") << 4 << 3 << 0 << 0 << QString("");
+ QTest::newRow("data5") << 4 << 3 << 0 << 0 << QString("x");
+ QTest::newRow("data6") << 4 << 3 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
+ QTest::newRow("data7") << 4 << 0 << 0 << 0 << QString("");
+ QTest::newRow("data8") << 4 << 0 << 0 << 0 << QString("x");
+ QTest::newRow("data9") << 4 << 0 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
+
+ QTest::newRow("data10") << 4 << 4 << -4 << 4 << QString("");
+ QTest::newRow("data11") << 4 << 4 << -4 << 4 << QString("x");
+ QTest::newRow("data12") << 4 << 4 << -4 << 4 << QString("xxxxxxxxxxxxxxxx");
+ QTest::newRow("data13") << 4 << 3 << -3 << 4 << QString("");
+ QTest::newRow("data14") << 4 << 3 << -3 << 4 << QString("x");
+ QTest::newRow("data15") << 4 << 3 << -3 << 4 << QString("xxxxxxxxxxxxxxxx");
+ QTest::newRow("data16") << 4 << 0 << 0 << 4 << QString("");
+ QTest::newRow("data17") << 4 << 0 << 0 << 4 << QString("x");
+ QTest::newRow("data18") << 4 << 0 << 0 << 4 << QString("xxxxxxxxxxxxxxxx");
+
+ QTest::newRow("data19") << 4 << 4 << -4 << 0 << QString("");
+ QTest::newRow("data20") << 4 << 4 << -4 << 0 << QString("x");
+ QTest::newRow("data21") << 4 << 4 << -4 << 0 << QString("xxxxxxxxxxxxxxxx");
+ QTest::newRow("data22") << 4 << 3 << -3 << 0 << QString("");
+ QTest::newRow("data23") << 4 << 3 << -3 << 0 << QString("x");
+ QTest::newRow("data24") << 4 << 3 << -3 << 0 << QString("xxxxxxxxxxxxxxxx");
}
void tst_QLineEdit::task233101_cursorPosAfterInputMethod()
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index c3d982388d..07efb60b49 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
@@ -657,22 +657,22 @@ void tst_QSpinBox::valueFromTextAndValidate_data()
QTest::newRow("data3") << QString("2") << Acceptable << 0 << 100 << QString();
QTest::newRow("data4") << QString() << Intermediate << 0 << 1 << QString();
QTest::newRow("data5") << QString() << Invalid << 0 << 0 << QString();
- QTest::newRow("data5") << QString("5") << Intermediate << 2004 << 2005 << QString();
- QTest::newRow("data6") << QString("50") << Intermediate << 2004 << 2005 << QString();
- QTest::newRow("data7") << QString("205") << Intermediate << 2004 << 2005 << QString();
- QTest::newRow("data8") << QString("2005") << Acceptable << 2004 << 2005 << QString();
- QTest::newRow("data9") << QString("3") << Intermediate << 2004 << 2005 << QString();
- QTest::newRow("data10") << QString("-") << Intermediate << -20 << -10 << QString();
- QTest::newRow("data11") << QString("-1") << Intermediate << -20 << -10 << QString();
- QTest::newRow("data12") << QString("-5") << Intermediate << -20 << -10 << QString();
- QTest::newRow("data13") << QString("-5") << Intermediate << -20 << -16 << QString();
- QTest::newRow("data14") << QString("-2") << Intermediate << -20 << -16 << QString();
- QTest::newRow("data15") << QString("2") << Invalid << -20 << -16 << QString();
- QTest::newRow("data16") << QString() << Intermediate << -20 << -16 << QString();
- QTest::newRow("data17") << QString(" 22") << Acceptable << 0 << 1000 << QString("22");
- QTest::newRow("data18") << QString("22 ") << Acceptable << 0 << 1000 << QString("22");
- QTest::newRow("data19") << QString(" 22 ") << Acceptable << 0 << 1000 << QString("22");
- QTest::newRow("data20") << QString("2 2") << Invalid << 0 << 1000 << QString();
+ QTest::newRow("data6") << QString("5") << Intermediate << 2004 << 2005 << QString();
+ QTest::newRow("data7") << QString("50") << Intermediate << 2004 << 2005 << QString();
+ QTest::newRow("data8") << QString("205") << Intermediate << 2004 << 2005 << QString();
+ QTest::newRow("data9") << QString("2005") << Acceptable << 2004 << 2005 << QString();
+ QTest::newRow("data10") << QString("3") << Intermediate << 2004 << 2005 << QString();
+ QTest::newRow("data11") << QString("-") << Intermediate << -20 << -10 << QString();
+ QTest::newRow("data12") << QString("-1") << Intermediate << -20 << -10 << QString();
+ QTest::newRow("data13") << QString("-5") << Intermediate << -20 << -10 << QString();
+ QTest::newRow("data14") << QString("-5") << Intermediate << -20 << -16 << QString();
+ QTest::newRow("data15") << QString("-2") << Intermediate << -20 << -16 << QString();
+ QTest::newRow("data16") << QString("2") << Invalid << -20 << -16 << QString();
+ QTest::newRow("data17") << QString() << Intermediate << -20 << -16 << QString();
+ QTest::newRow("data18") << QString(" 22") << Acceptable << 0 << 1000 << QString("22");
+ QTest::newRow("data19") << QString("22 ") << Acceptable << 0 << 1000 << QString("22");
+ QTest::newRow("data20") << QString(" 22 ") << Acceptable << 0 << 1000 << QString("22");
+ QTest::newRow("data21") << QString("2 2") << Invalid << 0 << 1000 << QString();
}
static QString stateName(int state)
diff --git a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
index 048f1441a2..294a656482 100644
--- a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
@@ -507,7 +507,7 @@ void tst_QSplitter::setStretchFactor_data()
QTest::newRow("ok06") << int(Qt::Vertical) << 1 << 1 << 1 << 1;
QTest::newRow("ok07") << int(Qt::Vertical) << 2 << 2 << 2 << 2;
QTest::newRow("ok08") << int(Qt::Vertical) << 3 << 5 << 5 << 5;
- QTest::newRow("ok08") << int(Qt::Vertical) << -1 << 5 << 0 << 0;
+ QTest::newRow("ok09") << int(Qt::Vertical) << -1 << 5 << 0 << 0;
}
void tst_QSplitter::setStretchFactor()