From eb64bb89cf6b7aa892c44723e3d14b845cc178bd Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 14 Feb 2012 13:13:05 +1000 Subject: Eliminate duplicate data row names in dbus, tools and xml autotests. Change-Id: Ic734435f57bb4f2160ecb3bc645e642207931a99 Reviewed-by: Rohan McGovern --- .../dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp | 4 +- tests/auto/tools/moc/tst_moc.cpp | 6 +-- tests/auto/xml/dom/qdom/tst_qdom.cpp | 53 +++++++++++----------- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp index 7eb31ffb41..25e3fdeabd 100644 --- a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp +++ b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp @@ -470,12 +470,12 @@ void tst_QDBusXmlParser::properties_data() prop.type = "i"; prop.access = QDBusIntrospection::Property::Read; map << prop; - QTest::newRow("two") << + QTest::newRow("two-1") << "" "" << map; // invert the order of the declaration - QTest::newRow("two") << + QTest::newRow("two-2") << "" "" << map; diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 0aa1a68a64..27db6cc59c 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -1623,7 +1623,7 @@ void tst_Moc::warnings_data() << QString("standard input:1: Warning: Property declaration x has no READ accessor function. The property will be invalid."); // Passing "-nn" should NOT suppress the warning - QTest::newRow("Invalid property warning") + QTest::newRow("Invalid property warning with -nn") << QByteArray("class X : public QObject { Q_OBJECT Q_PROPERTY(int x) };") << (QStringList() << "-nn") << 0 @@ -1631,7 +1631,7 @@ void tst_Moc::warnings_data() << QString("standard input:1: Warning: Property declaration x has no READ accessor function. The property will be invalid."); // Passing "-nw" should suppress the warning - QTest::newRow("Invalid property warning") + QTest::newRow("Invalid property warning with -nw") << QByteArray("class X : public QObject { Q_OBJECT Q_PROPERTY(int x) };") << (QStringList() << "-nw") << 0 @@ -1655,7 +1655,7 @@ void tst_Moc::warnings_data() << QString("standard input:1: Error: Class contains Q_OBJECT macro but does not inherit from QObject"); // "-nw" should not suppress the error - QTest::newRow("Does not inherit QObject with -nn") + QTest::newRow("Does not inherit QObject with -nw") << QByteArray("class X { Q_OBJECT };") << (QStringList() << "-nw") << 1 diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp index f9570f7631..d79044157a 100644 --- a/tests/auto/xml/dom/qdom/tst_qdom.cpp +++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp @@ -555,7 +555,6 @@ void tst_QDom::saveWithSerialization_data() const if (prefix.isEmpty()) QFAIL("Cannot find testdata!"); QTest::newRow("doc01.xml") << QString(prefix + "/doc01.xml"); - QTest::newRow("doc01.xml") << QString(prefix + "/doc01.xml"); QTest::newRow("doc02.xml") << QString(prefix + "/doc02.xml"); QTest::newRow("doc03.xml") << QString(prefix + "/doc03.xml"); QTest::newRow("doc04.xml") << QString(prefix + "/doc04.xml"); @@ -1868,34 +1867,34 @@ void tst_QDom::setContentWhitespace_data() const QTest::addColumn("doc"); QTest::addColumn("expectedValidity"); - QTest::newRow("") << QString::fromLatin1(" ") << true; - QTest::newRow("") << QString::fromLatin1(" ") << true; - QTest::newRow("") << QString::fromLatin1(" ") << true; - QTest::newRow("") << QString::fromLatin1(" ") << true; - QTest::newRow("") << QString::fromLatin1("\n") << true; - QTest::newRow("") << QString::fromLatin1("\n\n") << true; - QTest::newRow("") << QString::fromLatin1("\n\n\n") << true; - QTest::newRow("") << QString::fromLatin1("\n\n\n\n") << true; - QTest::newRow("") << QString::fromLatin1("\t") << true; - QTest::newRow("") << QString::fromLatin1("\t\t") << true; - QTest::newRow("") << QString::fromLatin1("\t\t\t") << true; - QTest::newRow("") << QString::fromLatin1("\t\t\t\t") << true; + QTest::newRow("data1") << QString::fromLatin1(" ") << true; + QTest::newRow("data2") << QString::fromLatin1(" ") << true; + QTest::newRow("data3") << QString::fromLatin1(" ") << true; + QTest::newRow("data4") << QString::fromLatin1(" ") << true; + QTest::newRow("data5") << QString::fromLatin1("\n") << true; + QTest::newRow("data6") << QString::fromLatin1("\n\n") << true; + QTest::newRow("data7") << QString::fromLatin1("\n\n\n") << true; + QTest::newRow("data8") << QString::fromLatin1("\n\n\n\n") << true; + QTest::newRow("data9") << QString::fromLatin1("\t") << true; + QTest::newRow("data10") << QString::fromLatin1("\t\t") << true; + QTest::newRow("data11") << QString::fromLatin1("\t\t\t") << true; + QTest::newRow("data12") << QString::fromLatin1("\t\t\t\t") << true; /* With XML prolog. */ - QTest::newRow("") << QString::fromLatin1("") << true; - - QTest::newRow("") << QString::fromLatin1(" ") << false; - QTest::newRow("") << QString::fromLatin1(" ") << false; - QTest::newRow("") << QString::fromLatin1(" ") << false; - QTest::newRow("") << QString::fromLatin1(" ") << false; - QTest::newRow("") << QString::fromLatin1("\n") << false; - QTest::newRow("") << QString::fromLatin1("\n\n") << false; - QTest::newRow("") << QString::fromLatin1("\n\n\n") << false; - QTest::newRow("") << QString::fromLatin1("\n\n\n\n") << false; - QTest::newRow("") << QString::fromLatin1("\t") << false; - QTest::newRow("") << QString::fromLatin1("\t\t") << false; - QTest::newRow("") << QString::fromLatin1("\t\t\t") << false; - QTest::newRow("") << QString::fromLatin1("\t\t\t\t") << false; + QTest::newRow("data13") << QString::fromLatin1("") << true; + + QTest::newRow("data14") << QString::fromLatin1(" ") << false; + QTest::newRow("data15") << QString::fromLatin1(" ") << false; + QTest::newRow("data16") << QString::fromLatin1(" ") << false; + QTest::newRow("data17") << QString::fromLatin1(" ") << false; + QTest::newRow("data18") << QString::fromLatin1("\n") << false; + QTest::newRow("data19") << QString::fromLatin1("\n\n") << false; + QTest::newRow("data20") << QString::fromLatin1("\n\n\n") << false; + QTest::newRow("data21") << QString::fromLatin1("\n\n\n\n") << false; + QTest::newRow("data22") << QString::fromLatin1("\t") << false; + QTest::newRow("data23") << QString::fromLatin1("\t\t") << false; + QTest::newRow("data24") << QString::fromLatin1("\t\t\t") << false; + QTest::newRow("data25") << QString::fromLatin1("\t\t\t\t") << false; } void tst_QDom::taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const -- cgit v1.2.3