From 63e652ca7ec3b6983ebc8b0edd10199da862d53c Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 8 Oct 2009 17:13:23 +1000 Subject: Quieten expect net error --- .../declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp b/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp index 4d3ad55..5e24831 100644 --- a/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp +++ b/tests/auto/declarative/qfxpixmapcache/tst_qfxpixmapcache.cpp @@ -65,12 +65,13 @@ void tst_qfxpixmapcache::single_data() QTest::addColumn("target"); QTest::addColumn("incache"); QTest::addColumn("exists"); + QTest::addColumn("neterror"); // File URLs are optimized - QTest::newRow("local") << thisfile.resolved(QUrl("data/exists.png")) << localfile_optimized << true; - QTest::newRow("local") << thisfile.resolved(QUrl("data/notexists.png")) << localfile_optimized << false; - QTest::newRow("remote") << QUrl("http://qt.nokia.com/logo.png") << false << true; - QTest::newRow("remote") << QUrl("http://qt.nokia.com/thereisnologo.png") << false << false; + QTest::newRow("local") << thisfile.resolved(QUrl("data/exists.png")) << localfile_optimized << true << false; + QTest::newRow("local") << thisfile.resolved(QUrl("data/notexists.png")) << localfile_optimized << false << false; + QTest::newRow("remote") << QUrl("http://qt.nokia.com/logo.png") << false << true << false; + QTest::newRow("remote") << QUrl("http://qt.nokia.com/thereisnologo.png") << false << false << true; } void tst_qfxpixmapcache::single() @@ -78,6 +79,14 @@ void tst_qfxpixmapcache::single() QFETCH(QUrl, target); QFETCH(bool, incache); QFETCH(bool, exists); + QFETCH(bool, neterror); + + if (neterror) { + QString expected = "Network error loading QUrl( \"" + +target.toString()+"\" ) \"Error downloading " + +target.toString()+" - server replied: Not Found\" "; + QTest::ignoreMessage(QtWarningMsg, expected.toLatin1()); + } QPixmap pixmap; QVERIFY(pixmap.width() <= 0); // Check Qt assumption -- cgit v0.12