diff --git a/tests/TestQFilesystemHandler.cpp b/tests/TestQFilesystemHandler.cpp index 8e78b45..fa21a63 100644 --- a/tests/TestQFilesystemHandler.cpp +++ b/tests/TestQFilesystemHandler.cpp @@ -68,15 +68,15 @@ void TestQFilesystemHandler::testRequests_data() QTest::newRow("nonexistent resource") << "nonexistent" - << 404; + << static_cast(QHttpSocket::NotFound); QTest::newRow("outside document root") << "../outside" - << 404; + << static_cast(QHttpSocket::NotFound); QTest::newRow("inside document root") << "inside" - << 200; + << static_cast(QHttpSocket::OK); } void TestQFilesystemHandler::testRequests() diff --git a/tests/TestQSubHandler.cpp b/tests/TestQSubHandler.cpp index d37d11f..8e769c3 100644 --- a/tests/TestQSubHandler.cpp +++ b/tests/TestQSubHandler.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include "common/qsimplehttpclient.h" @@ -64,19 +65,19 @@ void TestQSubHandler::testPatterns_data() << QRegExp("\\w+") << QByteArray("test") << QString("") - << 200; + << static_cast(QHttpSocket::OK); QTest::newRow("no match") << QRegExp("\\d+") << QByteArray("test") << QString("") - << 404; + << static_cast(QHttpSocket::NotFound); QTest::newRow("path") << QRegExp("one/") << QByteArray("one/two") << QString("two") - << 200; + << static_cast(QHttpSocket::OK); } void TestQSubHandler::testPatterns()