From 9d2ff58f3642828e494e7e9b2df7dbb8e2cd408f Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 4 Oct 2011 10:32:49 +1000 Subject: Avoid using QSKIP in lieu of compile-time checks QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: I21664d8d92b27c26c64789fc08d0ec7b8988456a Reviewed-on: http://codereview.qt-project.org/5941 Reviewed-by: Qt Sanity Bot Reviewed-by: Rohan McGovern --- .../network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/auto/network/access/qnetworkcookiejar') diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp index 1b4256bb00..5051aa5fee 100644 --- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp +++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp @@ -54,8 +54,10 @@ private slots: void setCookiesFromUrl(); void cookiesForUrl_data(); void cookiesForUrl(); +#ifdef QT_BUILD_INTERNAL void effectiveTLDs_data(); void effectiveTLDs(); +#endif }; QT_BEGIN_NAMESPACE @@ -362,6 +364,8 @@ void tst_QNetworkCookieJar::cookiesForUrl() QCOMPARE(result, expectedResult); } +// This test requires private API. +#ifdef QT_BUILD_INTERNAL void tst_QNetworkCookieJar::effectiveTLDs_data() { QTest::addColumn("domain"); @@ -433,13 +437,11 @@ void tst_QNetworkCookieJar::effectiveTLDs_data() void tst_QNetworkCookieJar::effectiveTLDs() { -#ifndef QT_BUILD_INTERNAL - QSKIP("Test requires private API", SkipAll); -#endif QFETCH(QString, domain); QFETCH(bool, isTLD); QCOMPARE(qIsEffectiveTLD(domain), isTLD); } +#endif QTEST_MAIN(tst_QNetworkCookieJar) #include "tst_qnetworkcookiejar.moc" -- cgit v1.2.3