From 6dfb1de099158bb640f830647d09499934209b53 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 14 Feb 2012 13:10:02 +1000 Subject: Eliminate duplicate data row names in network autotests Change-Id: Icbfc24309a182f37268232fc3c299d35d6d6a0ea Reviewed-by: Rohan McGovern --- .../access/qnetworkcookie/tst_qnetworkcookie.cpp | 34 +++++++++++----------- .../qnetworkcookiejar/tst_qnetworkcookiejar.cpp | 6 ++-- .../qnetworkdiskcache/tst_qnetworkdiskcache.cpp | 2 +- tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp | 5 ++-- 4 files changed, 24 insertions(+), 23 deletions(-) (limited to 'tests/auto/network') diff --git a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp index 7c27973b56..bcd9cbdff7 100644 --- a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp +++ b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp @@ -165,11 +165,11 @@ void tst_QNetworkCookie::parseSingleCookie_data() QTest::newRow("with-value2") << " a=b" << cookie; QTest::newRow("with-value3") << "a=b " << cookie; QTest::newRow("with-value4") << " a=b " << cookie; - QTest::newRow("with-value4") << " a=b ;" << cookie; - QTest::newRow("with-value5") << "a =b" << cookie; - QTest::newRow("with-value6") << "a= b" << cookie; - QTest::newRow("with-value7") << "a = b" << cookie; - QTest::newRow("with-value8") << "a = b " << cookie; + QTest::newRow("with-value5") << " a=b ;" << cookie; + QTest::newRow("with-value6") << "a =b" << cookie; + QTest::newRow("with-value7") << "a= b" << cookie; + QTest::newRow("with-value8") << "a = b" << cookie; + QTest::newRow("with-value9") << "a = b " << cookie; cookie.setValue("\",\""); QTest::newRow("with-value-with-special1") << "a = \",\" " << cookie; @@ -376,31 +376,31 @@ void tst_QNetworkCookie::parseSingleCookie_data() // extra offsets cookie.setExpirationDate(QDateTime(QDate(1989, 1, 2), QTime(0, 0), Qt::UTC)); - QTest::newRow("zoneoffset-14") << "a=b;expires=Jan 1 89 15:0 JST+1" << cookie; + QTest::newRow("zoneoffset-15") << "a=b;expires=Jan 1 89 15:0 JST+1" << cookie; cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC)); - QTest::newRow("zoneoffset-15") << "a=b;expires=Jan 1 89 0:0 GMT+1" << cookie; + QTest::newRow("zoneoffset-16") << "a=b;expires=Jan 1 89 0:0 GMT+1" << cookie; cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC)); - QTest::newRow("zoneoffset-15b") << "a=b;expires=Jan 1 89 1:0 GMT-1" << cookie; + QTest::newRow("zoneoffset-17") << "a=b;expires=Jan 1 89 1:0 GMT-1" << cookie; cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC)); - QTest::newRow("zoneoffset-16") << "a=b;expires=Jan 1 89 0:0 GMT+01" << cookie; + QTest::newRow("zoneoffset-18") << "a=b;expires=Jan 1 89 0:0 GMT+01" << cookie; cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 5), Qt::UTC)); - QTest::newRow("zoneoffset-17") << "a=b;expires=Jan 1 89 0:0 GMT+0105" << cookie; + QTest::newRow("zoneoffset-19") << "a=b;expires=Jan 1 89 0:0 GMT+0105" << cookie; cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC)); - QTest::newRow("zoneoffset-18") << "a=b;expires=Jan 1 89 0:0 GMT+015" << cookie; + QTest::newRow("zoneoffset-20") << "a=b;expires=Jan 1 89 0:0 GMT+015" << cookie; cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC)); - QTest::newRow("zoneoffset-19") << "a=b;expires=Jan 1 89 0:0 GM" << cookie; + QTest::newRow("zoneoffset-21") << "a=b;expires=Jan 1 89 0:0 GM" << cookie; cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC)); - QTest::newRow("zoneoffset-19b") << "a=b;expires=Jan 1 89 0:0 GMT" << cookie; + QTest::newRow("zoneoffset-22") << "a=b;expires=Jan 1 89 0:0 GMT" << cookie; // offsets from gmt cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC)); - QTest::newRow("zoneoffset-20") << "a=b;expires=Jan 1 89 0:0 +1" << cookie; + QTest::newRow("zoneoffset-23") << "a=b;expires=Jan 1 89 0:0 +1" << cookie; cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC)); - QTest::newRow("zoneoffset-21") << "a=b;expires=Jan 1 89 0:0 +01" << cookie; + QTest::newRow("zoneoffset-24") << "a=b;expires=Jan 1 89 0:0 +01" << cookie; cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 1), Qt::UTC)); - QTest::newRow("zoneoffset-22") << "a=b;expires=Jan 1 89 0:0 +0101" << cookie; + QTest::newRow("zoneoffset-25") << "a=b;expires=Jan 1 89 0:0 +0101" << cookie; cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC)); - QTest::newRow("zoneoffset-23") << "a=b;expires=Jan 1 89 1:0 -1" << cookie; + QTest::newRow("zoneoffset-26") << "a=b;expires=Jan 1 89 1:0 -1" << cookie; // Y2k cookie.setExpirationDate(QDateTime(QDate(2000, 1, 1), QTime(0, 0), Qt::UTC)); diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp index 73d0a4a650..0e046ad6f9 100644 --- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp +++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp @@ -284,7 +284,7 @@ void tst_QNetworkCookieJar::cookiesForUrl_data() QTest::newRow("match-2") << allCookies << "http://nokia.com/web/" << result; QTest::newRow("match-3") << allCookies << "http://nokia.com/web/content" << result; QTest::newRow("match-4") << allCookies << "http://qt.nokia.com/web" << result; - QTest::newRow("match-4") << allCookies << "http://qt.nokia.com/web/" << result; + QTest::newRow("match-5") << allCookies << "http://qt.nokia.com/web/" << result; QTest::newRow("match-6") << allCookies << "http://qt.nokia.com/web/content" << result; cookie.setPath("/web/wiki"); @@ -295,7 +295,7 @@ void tst_QNetworkCookieJar::cookiesForUrl_data() QTest::newRow("one-match-2") << allCookies << "http://nokia.com/web/" << result; QTest::newRow("one-match-3") << allCookies << "http://nokia.com/web/content" << result; QTest::newRow("one-match-4") << allCookies << "http://qt.nokia.com/web" << result; - QTest::newRow("one-match-4") << allCookies << "http://qt.nokia.com/web/" << result; + QTest::newRow("one-match-5") << allCookies << "http://qt.nokia.com/web/" << result; QTest::newRow("one-match-6") << allCookies << "http://qt.nokia.com/web/content" << result; result.prepend(cookie); // longer path, it must match first @@ -317,7 +317,7 @@ void tst_QNetworkCookieJar::cookiesForUrl_data() QTest::newRow("exp-match-2") << allCookies << "http://nokia.com/web/" << result; QTest::newRow("exp-match-3") << allCookies << "http://nokia.com/web/content" << result; QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web" << result; - QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web/" << result; + QTest::newRow("exp-match-5") << allCookies << "http://qt.nokia.com/web/" << result; QTest::newRow("exp-match-6") << allCookies << "http://qt.nokia.com/web/content" << result; // path matching diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp index 533108e76b..8a3c52cf72 100644 --- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp +++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp @@ -306,7 +306,7 @@ void tst_QNetworkDiskCache::data_data() QNetworkCacheMetaData::RawHeaderList headers; headers.append(QNetworkCacheMetaData::RawHeader("type", "bin")); metaData.setRawHeaders(headers); - QTest::newRow("null") << metaData; + QTest::newRow("non-null") << metaData; } // public QIODevice* data(QUrl const& url) diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp index f59f0bb5a9..657b91152f 100644 --- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp +++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp @@ -295,10 +295,11 @@ void tst_QSslKey::toEncryptedPemOrDer_data() << "aAzZ`1234567890-=~!@#$%^&*()_+[]{}\\|;:'\",.<>/?"; // ### add more (?) foreach (KeyInfo keyInfo, keyInfoList) { foreach (QString password, passwords) { - QString testName = QString("%1-%2-%3-%4").arg(keyInfo.fileInfo.fileName()) + QString testName = QString("%1-%2-%3-%4-%5").arg(keyInfo.fileInfo.fileName()) .arg(keyInfo.algorithm == QSsl::Rsa ? "RSA" : "DSA") .arg(keyInfo.type == QSsl::PrivateKey ? "PrivateKey" : "PublicKey") - .arg(keyInfo.format == QSsl::Pem ? "PEM" : "DER"); + .arg(keyInfo.format == QSsl::Pem ? "PEM" : "DER") + .arg(password); QTest::newRow(testName.toLatin1()) << keyInfo.fileInfo.absoluteFilePath() << keyInfo.algorithm << keyInfo.type << keyInfo.format << password; -- cgit v1.2.3