mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-28 06:42:28 +08:00
ipc client connect test with working unit tests.
This commit is contained in:
@@ -18,21 +18,19 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "CIpcServer.h"
|
||||
#include "CIpcClient.h"
|
||||
#include "CSocketMultiplexer.h"
|
||||
#include "CEventQueue.h"
|
||||
|
||||
TEST(CIpcTests, serverSend)
|
||||
TEST(CIpcTests, connectToServer)
|
||||
{
|
||||
CSocketMultiplexer multiplexer;
|
||||
CEventQueue eventQueue;
|
||||
|
||||
CIpcServer server;
|
||||
server.listen();
|
||||
|
||||
CIpcClient client;
|
||||
client.connect();
|
||||
}
|
||||
|
||||
TEST(CIpcTests, clientSend)
|
||||
{
|
||||
CIpcServer server;
|
||||
server.listen();
|
||||
|
||||
CIpcClient client;
|
||||
client.connect();
|
||||
eventQueue.loop();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
class CMockEventQueue : public IEventQueue
|
||||
{
|
||||
public:
|
||||
MOCK_METHOD0(loop, void());
|
||||
MOCK_METHOD2(newOneShotTimer, CEventQueueTimer*(double, void*));
|
||||
MOCK_METHOD2(newTimer, CEventQueueTimer*(double, void*));
|
||||
MOCK_METHOD2(getEvent, bool(CEvent&, double));
|
||||
|
||||
Reference in New Issue
Block a user