From aa578c4e296a3bf5117fd878fcac70d1c11bd255 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Thu, 20 Mar 2014 23:21:49 +0100 Subject: TestHTTPServer: Make listening an explicit operation that reports failure. Use this to print the error message when listening fails, and switch to always stack allocating TestHTTPServer instances for easier cleanup. Change-Id: I63b2bd38963b66611dc08a5c322615d91a91e675 Reviewed-by: John Brooks Reviewed-by: J-P Nurmi Reviewed-by: Lorn Potter --- tests/auto/quick/qquicktext/tst_qquicktext.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/auto/quick/qquicktext') diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index 0b6998146e..3859fa8424 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -2022,7 +2022,8 @@ void tst_qquicktext::embeddedImages() QFETCH(QUrl, qmlfile); QFETCH(QString, error); - TestHTTPServer server(SERVER_PORT); + TestHTTPServer server; + QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString())); server.serveDirectory(testFile("http")); if (!error.isEmpty()) @@ -2760,7 +2761,8 @@ void tst_qquicktext::imgTagsBaseUrl() QFETCH(QUrl, contextUrl); QFETCH(qreal, imgHeight); - TestHTTPServer server(SERVER_PORT); + TestHTTPServer server; + QVERIFY2(server.listen(SERVER_PORT), qPrintable(server.errorString())); server.serveDirectory(testFile("")); QByteArray baseUrlFragment; -- cgit v1.2.3