fixed:
- (weird) linker error on windows caused by using different include. - IpcTests using private field which had a public accessor. - some includes using wrong lib.
This commit is contained in:
parent
ad8905ccbf
commit
f4bb72ce52
|
@ -1,25 +0,0 @@
|
||||||
/*
|
|
||||||
* synergy -- mouse and keyboard sharing utility
|
|
||||||
* Copyright (C) 2012 Bolton Software Ltd.
|
|
||||||
* Copyright (C) 2011 Chris Schoeneman
|
|
||||||
*
|
|
||||||
* This package is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* found in the file COPYING that should have accompanied this file.
|
|
||||||
*
|
|
||||||
* This package is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
// make everything public for unit tests
|
|
||||||
#ifdef TEST_ENV
|
|
||||||
#define protected public
|
|
||||||
#define private public
|
|
||||||
#endif
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "arch/ArchInternetUnix.h"
|
#include "arch/ArchInternetUnix.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
|
|
||||||
#define TEST_URL "https://synergy-foss.org/tests/?testString"
|
#define TEST_URL "https://synergy-foss.org/tests/?testString"
|
||||||
//#define TEST_URL "http://localhost/synergy/tests/?testString"
|
//#define TEST_URL "http://localhost/synergy/tests/?testString"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "arch/ArchInternetWindows.h"
|
#include "arch/ArchInternetWindows.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
|
|
||||||
#define TEST_URL "https://synergy-foss.org/tests/?testString"
|
#define TEST_URL "https://synergy-foss.org/tests/?testString"
|
||||||
//#define TEST_URL "http://localhost/synergy/tests/?testString"
|
//#define TEST_URL "http://localhost/synergy/tests/?testString"
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
|
|
||||||
#define TEST_ENV
|
#define TEST_ENV
|
||||||
|
|
||||||
#include "test/global/access.h"
|
|
||||||
#include "test/global/TestEventQueue.h"
|
#include "test/global/TestEventQueue.h"
|
||||||
#include "ipc/IpcServer.h"
|
#include "ipc/IpcServer.h"
|
||||||
#include "ipc/IpcClient.h"
|
#include "ipc/IpcClient.h"
|
||||||
|
@ -38,7 +37,7 @@
|
||||||
#include "base/EventQueue.h"
|
#include "base/EventQueue.h"
|
||||||
#include "base/TMethodEventJob.h"
|
#include "base/TMethodEventJob.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
|
|
||||||
#define TEST_IPC_PORT 24802
|
#define TEST_IPC_PORT 24802
|
||||||
|
|
||||||
|
@ -161,7 +160,7 @@ void
|
||||||
CIpcTests::connectToServer_handleMessageReceived(const CEvent& e, void*)
|
CIpcTests::connectToServer_handleMessageReceived(const CEvent& e, void*)
|
||||||
{
|
{
|
||||||
CIpcMessage* m = static_cast<CIpcMessage*>(e.getDataObject());
|
CIpcMessage* m = static_cast<CIpcMessage*>(e.getDataObject());
|
||||||
if (m->m_type == kIpcHello) {
|
if (m->type() == kIpcHello) {
|
||||||
m_connectToServer_hasClientNode =
|
m_connectToServer_hasClientNode =
|
||||||
m_connectToServer_server->hasClients(kIpcClientNode);
|
m_connectToServer_server->hasClients(kIpcClientNode);
|
||||||
m_connectToServer_helloMessageReceived = true;
|
m_connectToServer_helloMessageReceived = true;
|
||||||
|
@ -173,12 +172,12 @@ void
|
||||||
CIpcTests::sendMessageToServer_serverHandleMessageReceived(const CEvent& e, void*)
|
CIpcTests::sendMessageToServer_serverHandleMessageReceived(const CEvent& e, void*)
|
||||||
{
|
{
|
||||||
CIpcMessage* m = static_cast<CIpcMessage*>(e.getDataObject());
|
CIpcMessage* m = static_cast<CIpcMessage*>(e.getDataObject());
|
||||||
if (m->m_type == kIpcHello) {
|
if (m->type() == kIpcHello) {
|
||||||
LOG((CLOG_DEBUG "client said hello, sending test to server"));
|
LOG((CLOG_DEBUG "client said hello, sending test to server"));
|
||||||
CIpcCommandMessage m("test", true);
|
CIpcCommandMessage m("test", true);
|
||||||
m_sendMessageToServer_client->send(m);
|
m_sendMessageToServer_client->send(m);
|
||||||
}
|
}
|
||||||
else if (m->m_type == kIpcCommand) {
|
else if (m->type() == kIpcCommand) {
|
||||||
CIpcCommandMessage* cm = static_cast<CIpcCommandMessage*>(m);
|
CIpcCommandMessage* cm = static_cast<CIpcCommandMessage*>(m);
|
||||||
LOG((CLOG_DEBUG "got ipc command message, %d", cm->command().c_str()));
|
LOG((CLOG_DEBUG "got ipc command message, %d", cm->command().c_str()));
|
||||||
m_sendMessageToServer_receivedString = cm->command();
|
m_sendMessageToServer_receivedString = cm->command();
|
||||||
|
@ -190,7 +189,7 @@ void
|
||||||
CIpcTests::sendMessageToClient_serverHandleClientConnected(const CEvent& e, void*)
|
CIpcTests::sendMessageToClient_serverHandleClientConnected(const CEvent& e, void*)
|
||||||
{
|
{
|
||||||
CIpcMessage* m = static_cast<CIpcMessage*>(e.getDataObject());
|
CIpcMessage* m = static_cast<CIpcMessage*>(e.getDataObject());
|
||||||
if (m->m_type == kIpcHello) {
|
if (m->type() == kIpcHello) {
|
||||||
LOG((CLOG_DEBUG "client said hello, sending test to client"));
|
LOG((CLOG_DEBUG "client said hello, sending test to client"));
|
||||||
CIpcLogLineMessage m("test");
|
CIpcLogLineMessage m("test");
|
||||||
m_sendMessageToClient_server->send(m, kIpcClientNode);
|
m_sendMessageToClient_server->send(m, kIpcClientNode);
|
||||||
|
@ -201,7 +200,7 @@ void
|
||||||
CIpcTests::sendMessageToClient_clientHandleMessageReceived(const CEvent& e, void*)
|
CIpcTests::sendMessageToClient_clientHandleMessageReceived(const CEvent& e, void*)
|
||||||
{
|
{
|
||||||
CIpcMessage* m = static_cast<CIpcMessage*>(e.getDataObject());
|
CIpcMessage* m = static_cast<CIpcMessage*>(e.getDataObject());
|
||||||
if (m->m_type == kIpcLogLine) {
|
if (m->type() == kIpcLogLine) {
|
||||||
CIpcLogLineMessage* llm = static_cast<CIpcLogLineMessage*>(m);
|
CIpcLogLineMessage* llm = static_cast<CIpcLogLineMessage*>(m);
|
||||||
LOG((CLOG_DEBUG "got ipc log message, %d", llm->logLine().c_str()));
|
LOG((CLOG_DEBUG "got ipc log message, %d", llm->logLine().c_str()));
|
||||||
m_sendMessageToClient_receivedString = llm->logLine();
|
m_sendMessageToClient_receivedString = llm->logLine();
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "base/TMethodJob.h"
|
#include "base/TMethodJob.h"
|
||||||
#include "base/Log.h"
|
#include "base/Log.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
#include "platform/MSWindowsClipboard.h"
|
#include "platform/MSWindowsClipboard.h"
|
||||||
#include "platform/IMSWindowsClipboardFacade.h"
|
#include "platform/IMSWindowsClipboardFacade.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
|
|
||||||
class CMSWindowsClipboardTests : public ::testing::Test
|
class CMSWindowsClipboardTests : public ::testing::Test
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,17 +18,16 @@
|
||||||
|
|
||||||
#define TEST_ENV
|
#define TEST_ENV
|
||||||
|
|
||||||
#include "test/global/access.h"
|
#include "test/mock/synergy/MockEventQueue.h"
|
||||||
|
#include "test/mock/synergy/MockKeyMap.h"
|
||||||
#include "platform/MSWindowsKeyState.h"
|
#include "platform/MSWindowsKeyState.h"
|
||||||
#include "platform/MSWindowsDesks.h"
|
#include "platform/MSWindowsDesks.h"
|
||||||
#include "platform/MSWindowsScreen.h"
|
#include "platform/MSWindowsScreen.h"
|
||||||
#include "platform/MSWindowsScreenSaver.h"
|
#include "platform/MSWindowsScreenSaver.h"
|
||||||
#include "synergy/CMockEventQueue.h"
|
|
||||||
#include "synergy/CMockKeyMap.h"
|
|
||||||
#include "base/TMethodJob.h"
|
#include "base/TMethodJob.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
// wParam = flags, HIBYTE(lParam) = virtual key, LOBYTE(lParam) = scan code
|
// wParam = flags, HIBYTE(lParam) = virtual key, LOBYTE(lParam) = scan code
|
||||||
#define SYNERGY_MSG_FAKE_KEY SYNERGY_HOOK_LAST_MSG + 4
|
#define SYNERGY_MSG_FAKE_KEY SYNERGY_HOOK_LAST_MSG + 4
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "test/global/access.h"
|
|
||||||
#include "platform/OSXScreen.h"
|
#include "platform/OSXScreen.h"
|
||||||
#include "arch/Arch.h"
|
#include "arch/Arch.h"
|
||||||
#include "base/EventQueue.h"
|
#include "base/EventQueue.h"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include "platform/XWindowsClipboard.h"
|
#include "platform/XWindowsClipboard.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
class CXWindowsClipboardTests : public ::testing::Test
|
class CXWindowsClipboardTests : public ::testing::Test
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
# include <X11/XKBlib.h>
|
# include <X11/XKBlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
class CXWindowsKeyStateTests : public ::testing::Test
|
class CXWindowsKeyStateTests : public ::testing::Test
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "test/mock/synergy/MockEventQueue.h"
|
#include "test/mock/synergy/MockEventQueue.h"
|
||||||
#include "platform/XWindowsScreenSaver.h"
|
#include "platform/XWindowsScreenSaver.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
using ::testing::_;
|
using ::testing::_;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "platform/XWindowsScreen.h"
|
#include "platform/XWindowsScreen.h"
|
||||||
#include "synergy/CMockEventQueue.h"
|
#include "synergy/CMockEventQueue.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include "test/global/gtest.h"
|
||||||
|
|
||||||
using ::testing::_;
|
using ::testing::_;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#define TEST_ENV
|
#define TEST_ENV
|
||||||
|
|
||||||
#include "synergy/PrimaryClient.h"
|
#include "server/PrimaryClient.h"
|
||||||
#include "base/String.h"
|
#include "base/String.h"
|
||||||
|
|
||||||
#include "test/global/gmock.h"
|
#include "test/global/gmock.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "server/Server.h"
|
#include "server/Server.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include "test/global/gmock.h"
|
||||||
|
|
||||||
class IEventQueue;
|
class IEventQueue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue