fix websockets test define

This commit is contained in:
Simon Stürz 2015-08-04 15:18:59 +02:00 committed by Michael Zanetti
parent fc86244018
commit 345cd53f7e
3 changed files with 14 additions and 6 deletions

View File

@ -14,8 +14,6 @@ SUBDIRS = versioning \
restplugins \
restvendors \
restrules \
websocketserver \
contains(DEFINES, WEBSOCKET){
SUBDIRS += websocketserver
}

View File

@ -29,9 +29,12 @@
#include <QMetaType>
#include <QByteArray>
#include <QSignalSpy>
#include <QWebSocket>
#include <QJsonDocument>
#ifdef WEBSOCKET
#include <QWebSocket>
#endif
using namespace guhserver;
class TestWebSocketServer: public GuhTestBase
@ -39,16 +42,19 @@ class TestWebSocketServer: public GuhTestBase
Q_OBJECT
private slots:
#ifdef WEBSOCKET
void testHandshake();
void pingTest();
void introspect();
#endif
private:
};
#ifdef WEBSOCKET
void TestWebSocketServer::testHandshake()
{
@ -89,5 +95,7 @@ void TestWebSocketServer::introspect()
}
#endif
#include "testwebsocketserver.moc"
QTEST_MAIN(TestWebSocketServer)

View File

@ -1,7 +1,9 @@
include(../../../guh.pri)
include(../autotests.pri)
QT += websockets
contains(DEFINES, WEBSOCKET){
QT += websockets
}
TARGET = websocketserver
SOURCES += testwebsocketserver.cpp