fix websockets test define
This commit is contained in:
parent
fc86244018
commit
345cd53f7e
@ -14,8 +14,6 @@ SUBDIRS = versioning \
|
||||
restplugins \
|
||||
restvendors \
|
||||
restrules \
|
||||
websocketserver \
|
||||
|
||||
contains(DEFINES, WEBSOCKET){
|
||||
SUBDIRS += websocketserver
|
||||
}
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
include(../../../guh.pri)
|
||||
include(../autotests.pri)
|
||||
|
||||
QT += websockets
|
||||
contains(DEFINES, WEBSOCKET){
|
||||
QT += websockets
|
||||
}
|
||||
|
||||
TARGET = websocketserver
|
||||
SOURCES += testwebsocketserver.cpp
|
||||
|
||||
Reference in New Issue
Block a user