mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-02 01:47:37 +08:00
rebranding symless/synergy to debauchee/barrier
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# synergy -- mouse and keyboard sharing utility
|
||||
# barrier -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2012-2016 Symless Ltd.
|
||||
# Copyright (C) 2011 Nick Bolton
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2013-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2013-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2012 Nick Bolton
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2012 Nick Bolton
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2012 Nick Bolton
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# synergy -- mouse and keyboard sharing utility
|
||||
# barrier -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2012-2016 Symless Ltd.
|
||||
# Copyright (C) 2009 Nick Bolton
|
||||
#
|
||||
@@ -49,7 +49,7 @@ file(GLOB_RECURSE mock_sources "../../test/mock/*.cpp")
|
||||
list(APPEND headers ${mock_headers})
|
||||
list(APPEND sources ${mock_sources})
|
||||
|
||||
if (SYNERGY_ADD_HEADERS)
|
||||
if (BARRIER_ADD_HEADERS)
|
||||
list(APPEND sources ${headers})
|
||||
endif()
|
||||
|
||||
@@ -68,4 +68,4 @@ endif()
|
||||
|
||||
add_executable(integtests ${sources})
|
||||
target_link_libraries(integtests
|
||||
arch base client common io ipc mt net platform server synergy gtest gmock ${libs} ${OPENSSL_LIBS})
|
||||
arch base client common io ipc mt net platform server barrier gtest gmock ${libs} ${OPENSSL_LIBS})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
#define TEST_URL "https://symless.com/tests/?testString"
|
||||
//#define TEST_URL "http://localhost/synergy/tests/?testString"
|
||||
//#define TEST_URL "http://localhost/barrier/tests/?testString"
|
||||
|
||||
TEST(ArchInternetTests, get)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2012 Nick Bolton
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2013-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -22,15 +22,15 @@
|
||||
|
||||
#include "test/mock/server/MockConfig.h"
|
||||
#include "test/mock/server/MockPrimaryClient.h"
|
||||
#include "test/mock/synergy/MockScreen.h"
|
||||
#include "test/mock/barrier/MockScreen.h"
|
||||
#include "test/mock/server/MockInputFilter.h"
|
||||
#include "test/global/TestEventQueue.h"
|
||||
#include "server/Server.h"
|
||||
#include "server/ClientListener.h"
|
||||
#include "server/ClientProxy.h"
|
||||
#include "client/Client.h"
|
||||
#include "synergy/FileChunk.h"
|
||||
#include "synergy/StreamChunker.h"
|
||||
#include "barrier/FileChunk.h"
|
||||
#include "barrier/StreamChunker.h"
|
||||
#include "net/SocketMultiplexer.h"
|
||||
#include "net/NetworkAddress.h"
|
||||
#include "net/TCPSocketFactory.h"
|
||||
@@ -424,7 +424,7 @@ void
|
||||
NetworkTests::sendMockData(void* eventTarget)
|
||||
{
|
||||
// send first message (file size)
|
||||
String size = synergy::string::sizeTypeToString(kMockDataSize);
|
||||
String size = barrier::string::sizeTypeToString(kMockDataSize);
|
||||
FileChunk* sizeMessage = FileChunk::start(size);
|
||||
|
||||
m_events.addEvent(Event(m_events.forFile().fileChunkSending(), eventTarget, sizeMessage));
|
||||
@@ -468,19 +468,19 @@ newMockData(size_t size)
|
||||
size_t headSize = sizeof(head) - 1;
|
||||
const UInt8 tail[] = "... mock tail";
|
||||
size_t tailSize = sizeof(tail) - 1;
|
||||
const UInt8 synergyRocks[] = "synergy\0 rocks! ";
|
||||
size_t synergyRocksSize = sizeof(synergyRocks) - 1;
|
||||
const UInt8 barrierRocks[] = "barrier\0 rocks! ";
|
||||
size_t barrierRocksSize = sizeof(barrierRocks) - 1;
|
||||
|
||||
memcpy(data, head, headSize);
|
||||
data += headSize;
|
||||
|
||||
size_t times = (size - headSize - tailSize) / synergyRocksSize;
|
||||
size_t times = (size - headSize - tailSize) / barrierRocksSize;
|
||||
for (size_t i = 0; i < times; ++i) {
|
||||
memcpy(data, synergyRocks, synergyRocksSize);
|
||||
data += synergyRocksSize;
|
||||
memcpy(data, barrierRocks, barrierRocksSize);
|
||||
data += barrierRocksSize;
|
||||
}
|
||||
|
||||
size_t remainder = (size - headSize - tailSize) % synergyRocksSize;
|
||||
size_t remainder = (size - headSize - tailSize) % barrierRocksSize;
|
||||
if (remainder != 0) {
|
||||
memset(data, '.', remainder);
|
||||
data += remainder;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -74,7 +74,7 @@ TEST_F(MSWindowsClipboardTests, empty_singleFormat_hasReturnsFalse)
|
||||
{
|
||||
MSWindowsClipboard clipboard(NULL);
|
||||
clipboard.open(0);
|
||||
clipboard.add(MSWindowsClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(MSWindowsClipboard::kText, "barrier rocks!");
|
||||
|
||||
clipboard.empty();
|
||||
|
||||
@@ -87,10 +87,10 @@ TEST_F(MSWindowsClipboardTests, add_newValue_valueWasStored)
|
||||
MSWindowsClipboard clipboard(NULL);
|
||||
clipboard.open(0);
|
||||
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
EXPECT_EQ("synergy rocks!", actual);
|
||||
EXPECT_EQ("barrier rocks!", actual);
|
||||
}
|
||||
|
||||
TEST_F(MSWindowsClipboardTests, add_newValue_writeWasCalled)
|
||||
@@ -102,7 +102,7 @@ TEST_F(MSWindowsClipboardTests, add_newValue_writeWasCalled)
|
||||
clipboard.setFacade(facade);
|
||||
clipboard.open(0);
|
||||
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
}
|
||||
|
||||
TEST_F(MSWindowsClipboardTests, add_replaceValue_valueWasReplaced)
|
||||
@@ -110,7 +110,7 @@ TEST_F(MSWindowsClipboardTests, add_replaceValue_valueWasReplaced)
|
||||
MSWindowsClipboard clipboard(NULL);
|
||||
clipboard.open(0);
|
||||
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
clipboard.add(IClipboard::kText, "maxivista sucks"); // haha, just kidding.
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
@@ -177,7 +177,7 @@ TEST_F(MSWindowsClipboardTests, has_withFormatAdded_returnsTrue)
|
||||
MSWindowsClipboard clipboard(NULL);
|
||||
clipboard.open(0);
|
||||
clipboard.empty();
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
bool actual = clipboard.has(IClipboard::kText);
|
||||
|
||||
@@ -211,19 +211,19 @@ TEST_F(MSWindowsClipboardTests, get_withFormatAdded_returnsExpected)
|
||||
MSWindowsClipboard clipboard(NULL);
|
||||
clipboard.open(0);
|
||||
clipboard.empty();
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
|
||||
EXPECT_EQ("synergy rocks!", actual);
|
||||
EXPECT_EQ("barrier rocks!", actual);
|
||||
}
|
||||
|
||||
TEST_F(MSWindowsClipboardTests, isOwnedBySynergy_defaultState_noError)
|
||||
TEST_F(MSWindowsClipboardTests, isOwnedByBarrier_defaultState_noError)
|
||||
{
|
||||
MSWindowsClipboard clipboard(NULL);
|
||||
clipboard.open(0);
|
||||
|
||||
bool actual = clipboard.isOwnedBySynergy();
|
||||
bool actual = clipboard.isOwnedByBarrier();
|
||||
|
||||
EXPECT_EQ(true, actual);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
#define TEST_ENV
|
||||
|
||||
#include "test/mock/synergy/MockEventQueue.h"
|
||||
#include "test/mock/synergy/MockKeyMap.h"
|
||||
#include "test/mock/barrier/MockEventQueue.h"
|
||||
#include "test/mock/barrier/MockKeyMap.h"
|
||||
#include "platform/MSWindowsKeyState.h"
|
||||
#include "platform/MSWindowsDesks.h"
|
||||
#include "platform/MSWindowsScreen.h"
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "test/global/gmock.h"
|
||||
|
||||
// wParam = flags, HIBYTE(lParam) = virtual key, LOBYTE(lParam) = scan code
|
||||
#define SYNERGY_MSG_FAKE_KEY SYNERGY_HOOK_LAST_MSG + 4
|
||||
#define BARRIER_MSG_FAKE_KEY BARRIER_HOOK_LAST_MSG + 4
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::NiceMock;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -35,7 +35,7 @@ TEST(OSXClipboardTests, empty_singleFormat_hasReturnsFalse)
|
||||
{
|
||||
OSXClipboard clipboard;
|
||||
clipboard.open(0);
|
||||
clipboard.add(OSXClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(OSXClipboard::kText, "barrier rocks!");
|
||||
|
||||
clipboard.empty();
|
||||
|
||||
@@ -48,10 +48,10 @@ TEST(OSXClipboardTests, add_newValue_valueWasStored)
|
||||
OSXClipboard clipboard;
|
||||
clipboard.open(0);
|
||||
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
EXPECT_EQ("synergy rocks!", actual);
|
||||
EXPECT_EQ("barrier rocks!", actual);
|
||||
}
|
||||
|
||||
TEST(OSXClipboardTests, add_replaceValue_valueWasReplaced)
|
||||
@@ -59,7 +59,7 @@ TEST(OSXClipboardTests, add_replaceValue_valueWasReplaced)
|
||||
OSXClipboard clipboard;
|
||||
clipboard.open(0);
|
||||
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
clipboard.add(IClipboard::kText, "maxivista sucks"); // haha, just kidding.
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
@@ -122,7 +122,7 @@ TEST(OSXClipboardTests, has_withFormatAdded_returnsTrue)
|
||||
OSXClipboard clipboard;
|
||||
clipboard.open(0);
|
||||
clipboard.empty();
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
bool actual = clipboard.has(IClipboard::kText);
|
||||
|
||||
@@ -156,9 +156,9 @@ TEST(OSXClipboardTests, get_withFormatAdded_returnsExpected)
|
||||
OSXClipboard clipboard;
|
||||
clipboard.open(0);
|
||||
clipboard.empty();
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
|
||||
EXPECT_EQ("synergy rocks!", actual);
|
||||
EXPECT_EQ("barrier rocks!", actual);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "test/mock/synergy/MockKeyMap.h"
|
||||
#include "test/mock/synergy/MockEventQueue.h"
|
||||
#include "test/mock/barrier/MockKeyMap.h"
|
||||
#include "test/mock/barrier/MockEventQueue.h"
|
||||
#include "platform/OSXKeyState.h"
|
||||
#include "base/Log.h"
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
|
||||
TEST_F(OSXKeyStateTests, fakeAndPoll_shift)
|
||||
{
|
||||
synergy::KeyMap keyMap;
|
||||
barrier::KeyMap keyMap;
|
||||
MockEventQueue eventQueue;
|
||||
OSXKeyState keyState(&eventQueue, keyMap);
|
||||
keyState.updateKeyMap();
|
||||
@@ -60,7 +60,7 @@ TEST_F(OSXKeyStateTests, fakeAndPoll_shift)
|
||||
|
||||
TEST_F(OSXKeyStateTests, fakeAndPoll_charKey)
|
||||
{
|
||||
synergy::KeyMap keyMap;
|
||||
barrier::KeyMap keyMap;
|
||||
MockEventQueue eventQueue;
|
||||
OSXKeyState keyState(&eventQueue, keyMap);
|
||||
keyState.updateKeyMap();
|
||||
@@ -79,7 +79,7 @@ TEST_F(OSXKeyStateTests, fakeAndPoll_charKey)
|
||||
|
||||
TEST_F(OSXKeyStateTests, fakeAndPoll_charKeyAndModifier)
|
||||
{
|
||||
synergy::KeyMap keyMap;
|
||||
barrier::KeyMap keyMap;
|
||||
MockEventQueue eventQueue;
|
||||
OSXKeyState keyState(&eventQueue, keyMap);
|
||||
keyState.updateKeyMap();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -77,7 +77,7 @@ TEST_F(CXWindowsClipboardTests, empty_openCalled_returnsTrue)
|
||||
TEST_F(CXWindowsClipboardTests, empty_singleFormat_hasReturnsFalse)
|
||||
{
|
||||
CXWindowsClipboard clipboard = createClipboard();
|
||||
clipboard.add(CXWindowsClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(CXWindowsClipboard::kText, "barrier rocks!");
|
||||
|
||||
clipboard.empty();
|
||||
|
||||
@@ -89,17 +89,17 @@ TEST_F(CXWindowsClipboardTests, add_newValue_valueWasStored)
|
||||
{
|
||||
CXWindowsClipboard clipboard = createClipboard();
|
||||
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
EXPECT_EQ("synergy rocks!", actual);
|
||||
EXPECT_EQ("barrier rocks!", actual);
|
||||
}
|
||||
|
||||
TEST_F(CXWindowsClipboardTests, add_replaceValue_valueWasReplaced)
|
||||
{
|
||||
CXWindowsClipboard clipboard = createClipboard();
|
||||
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
clipboard.add(IClipboard::kText, "maxivista sucks"); // haha, just kidding.
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
@@ -119,7 +119,7 @@ TEST_F(CXWindowsClipboardTests, close_isOpen_noErrors)
|
||||
TEST_F(CXWindowsClipboardTests, has_withFormatAdded_returnsTrue)
|
||||
{
|
||||
CXWindowsClipboard clipboard = createClipboard();
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
bool actual = clipboard.has(IClipboard::kText);
|
||||
|
||||
@@ -147,11 +147,11 @@ TEST_F(CXWindowsClipboardTests, get_withNoFormats_returnsEmpty)
|
||||
TEST_F(CXWindowsClipboardTests, get_withFormatAdded_returnsExpected)
|
||||
{
|
||||
CXWindowsClipboard clipboard = createClipboard();
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
|
||||
EXPECT_EQ("synergy rocks!", actual);
|
||||
EXPECT_EQ("barrier rocks!", actual);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
#define TEST_ENV
|
||||
|
||||
#include "test/mock/synergy/MockKeyMap.h"
|
||||
#include "test/mock/synergy/MockEventQueue.h"
|
||||
#include "test/mock/barrier/MockKeyMap.h"
|
||||
#include "test/mock/barrier/MockEventQueue.h"
|
||||
#include "platform/XWindowsKeyState.h"
|
||||
#include "base/Log.h"
|
||||
|
||||
@@ -171,13 +171,13 @@ TEST_F(XWindowsKeyStateTests, pollActiveModifiers_shiftKeyDownThenUp_masksAreCor
|
||||
|
||||
KeyCode key = XKeysymToKeycode(m_display, XK_Shift_L);
|
||||
|
||||
// fake shift key down (without using synergy)
|
||||
// fake shift key down (without using barrier)
|
||||
XTestFakeKeyEvent(m_display, key, true, CurrentTime);
|
||||
|
||||
// function under test (1st call)
|
||||
KeyModifierMask modDown = keyState.pollActiveModifiers();
|
||||
|
||||
// fake shift key up (without using synergy)
|
||||
// fake shift key up (without using barrier)
|
||||
XTestFakeKeyEvent(m_display, key, false, CurrentTime);
|
||||
|
||||
// function under test (2nd call)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -19,7 +19,7 @@
|
||||
// TODO: fix tests
|
||||
#if 0
|
||||
|
||||
#include "test/mock/synergy/MockEventQueue.h"
|
||||
#include "test/mock/barrier/MockEventQueue.h"
|
||||
#include "platform/XWindowsScreenSaver.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "test/mock/synergy/MockEventQueue.h"
|
||||
#include "test/mock/barrier/MockEventQueue.h"
|
||||
#include "platform/XWindowsScreen.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#define TEST_ENV
|
||||
|
||||
#include "synergy/App.h"
|
||||
#include "barrier/App.h"
|
||||
|
||||
#include "test/global/gmock.h"
|
||||
|
||||
@@ -40,5 +40,5 @@ public:
|
||||
MOCK_METHOD0(startNode, void());
|
||||
MOCK_METHOD0(mainLoop, int());
|
||||
MOCK_METHOD2(foregroundStartup, int(int, char**));
|
||||
MOCK_METHOD0(createScreen, synergy::Screen*());
|
||||
MOCK_METHOD0(createScreen, barrier::Screen*());
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#define TEST_ENV
|
||||
|
||||
#include "synergy/ArgParser.h"
|
||||
#include "barrier/ArgParser.h"
|
||||
|
||||
#include "test/global/gmock.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "synergy/KeyMap.h"
|
||||
#include "barrier/KeyMap.h"
|
||||
|
||||
#include "test/global/gmock.h"
|
||||
|
||||
class MockKeyMap : public synergy::KeyMap
|
||||
class MockKeyMap : public barrier::KeyMap
|
||||
{
|
||||
public:
|
||||
MOCK_METHOD1(swap, void(KeyMap&));
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "synergy/KeyState.h"
|
||||
#include "barrier/KeyState.h"
|
||||
|
||||
#include "test/global/gmock.h"
|
||||
|
||||
@@ -36,14 +36,14 @@ public:
|
||||
}
|
||||
|
||||
MockKeyState(const MockEventQueue& eventQueue, const MockKeyMap& keyMap) :
|
||||
KeyState((IEventQueue*)&eventQueue, (synergy::KeyMap&)keyMap)
|
||||
KeyState((IEventQueue*)&eventQueue, (barrier::KeyMap&)keyMap)
|
||||
{
|
||||
}
|
||||
|
||||
MOCK_CONST_METHOD0(pollActiveGroup, SInt32());
|
||||
MOCK_CONST_METHOD0(pollActiveModifiers, KeyModifierMask());
|
||||
MOCK_METHOD0(fakeCtrlAltDel, bool());
|
||||
MOCK_METHOD1(getKeyMap, void(synergy::KeyMap&));
|
||||
MOCK_METHOD1(getKeyMap, void(barrier::KeyMap&));
|
||||
MOCK_METHOD1(fakeKey, void(const Keystroke&));
|
||||
MOCK_METHOD1(fakeMediaKey, bool(KeyID));
|
||||
MOCK_CONST_METHOD1(pollPressedKeys, void(KeyButtonSet&));
|
||||
@@ -54,4 +54,4 @@ typedef ::testing::NiceMock<MockKeyState> KeyStateImpl;
|
||||
typedef UInt32 KeyID;
|
||||
|
||||
typedef void (*ForeachKeyCallback)(
|
||||
KeyID, SInt32 group, synergy::KeyMap::KeyItem&, void* userData);
|
||||
KeyID, SInt32 group, barrier::KeyMap::KeyItem&, void* userData);
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2013-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -19,14 +19,14 @@
|
||||
|
||||
#define TEST_ENV
|
||||
|
||||
#include "synergy/Screen.h"
|
||||
#include "barrier/Screen.h"
|
||||
|
||||
#include "test/global/gmock.h"
|
||||
|
||||
class MockScreen : public synergy::Screen
|
||||
class MockScreen : public barrier::Screen
|
||||
{
|
||||
public:
|
||||
MockScreen() : synergy::Screen() { }
|
||||
MockScreen() : barrier::Screen() { }
|
||||
MOCK_METHOD0(disable, void());
|
||||
MOCK_CONST_METHOD4(getShape, void(SInt32&, SInt32&, SInt32&, SInt32&));
|
||||
MOCK_CONST_METHOD2(getCursorPos, void(SInt32&, SInt32&));
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
class IEventQueue;
|
||||
|
||||
class MockStream : public synergy::IStream
|
||||
class MockStream : public barrier::IStream
|
||||
{
|
||||
public:
|
||||
MockStream() { }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2015-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2013-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2013-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2013-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2013-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# synergy -- mouse and keyboard sharing utility
|
||||
# barrier -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2012-2016 Symless Ltd.
|
||||
# Copyright (C) 2009 Nick Bolton
|
||||
#
|
||||
@@ -62,10 +62,10 @@ if (UNIX)
|
||||
)
|
||||
endif()
|
||||
|
||||
if (SYNERGY_ADD_HEADERS)
|
||||
if (BARRIER_ADD_HEADERS)
|
||||
list(APPEND sources ${headers})
|
||||
endif()
|
||||
|
||||
add_executable(unittests ${sources})
|
||||
target_link_libraries(unittests
|
||||
arch base client server common io net platform server synergy mt ipc gtest gmock shared ${libs} ${OPENSSL_LIBS})
|
||||
arch base client server common io net platform server barrier mt ipc gtest gmock shared ${libs} ${OPENSSL_LIBS})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -15,8 +15,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "synergy/ArgParser.h"
|
||||
#include "synergy/ArgsBase.h"
|
||||
#include "barrier/ArgParser.h"
|
||||
#include "barrier/ArgsBase.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -15,9 +15,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "synergy/ArgParser.h"
|
||||
#include "synergy/ClientArgs.h"
|
||||
#include "test/mock/synergy/MockArgParser.h"
|
||||
#include "barrier/ArgParser.h"
|
||||
#include "barrier/ClientArgs.h"
|
||||
#include "test/mock/barrier/MockArgParser.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
@@ -51,7 +51,7 @@ TEST(ClientArgsParsingTests, parseClientArgs_yScrollArg_setYScroll)
|
||||
EXPECT_EQ(1, clientArgs.m_yscroll);
|
||||
}
|
||||
|
||||
TEST(ClientArgsParsingTests, parseClientArgs_addressArg_setSynergyAddress)
|
||||
TEST(ClientArgsParsingTests, parseClientArgs_addressArg_setBarrierAddress)
|
||||
{
|
||||
NiceMock<MockArgParser> argParser;
|
||||
ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(client_stubParseGenericArgs));
|
||||
@@ -62,7 +62,7 @@ TEST(ClientArgsParsingTests, parseClientArgs_addressArg_setSynergyAddress)
|
||||
|
||||
bool result = argParser.parseClientArgs(clientArgs, argc, kAddressCmd);
|
||||
|
||||
EXPECT_EQ("mock_address", clientArgs.m_synergyAddress);
|
||||
EXPECT_EQ("mock_address", clientArgs.m_barrierAddress);
|
||||
EXPECT_EQ(true, result);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2015-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -15,8 +15,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "synergy/ClipboardChunk.h"
|
||||
#include "synergy/protocol_types.h"
|
||||
#include "barrier/ClipboardChunk.h"
|
||||
#include "barrier/protocol_types.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "synergy/Clipboard.h"
|
||||
#include "barrier/Clipboard.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
@@ -34,7 +34,7 @@ TEST(ClipboardTests, empty_singleFormat_hasReturnsFalse)
|
||||
{
|
||||
Clipboard clipboard;
|
||||
clipboard.open(0);
|
||||
clipboard.add(Clipboard::kText, "synergy rocks!");
|
||||
clipboard.add(Clipboard::kText, "barrier rocks!");
|
||||
|
||||
clipboard.empty();
|
||||
|
||||
@@ -47,10 +47,10 @@ TEST(ClipboardTests, add_newValue_valueWasStored)
|
||||
Clipboard clipboard;
|
||||
clipboard.open(0);
|
||||
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
EXPECT_EQ("synergy rocks!", actual);
|
||||
EXPECT_EQ("barrier rocks!", actual);
|
||||
}
|
||||
|
||||
TEST(ClipboardTests, add_replaceValue_valueWasReplaced)
|
||||
@@ -58,7 +58,7 @@ TEST(ClipboardTests, add_replaceValue_valueWasReplaced)
|
||||
Clipboard clipboard;
|
||||
clipboard.open(0);
|
||||
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
clipboard.add(IClipboard::kText, "maxivista sucks"); // haha, just kidding.
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
@@ -118,7 +118,7 @@ TEST(ClipboardTests, has_withFormatAdded_returnsTrue)
|
||||
{
|
||||
Clipboard clipboard;
|
||||
clipboard.open(0);
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
bool actual = clipboard.has(IClipboard::kText);
|
||||
|
||||
@@ -149,11 +149,11 @@ TEST(ClipboardTests, get_withFormatAdded_returnsExpected)
|
||||
{
|
||||
Clipboard clipboard;
|
||||
clipboard.open(0);
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
|
||||
EXPECT_EQ("synergy rocks!", actual);
|
||||
EXPECT_EQ("barrier rocks!", actual);
|
||||
}
|
||||
|
||||
TEST(ClipboardTests, marshall_addNotCalled_firstCharIsZero)
|
||||
@@ -171,7 +171,7 @@ TEST(ClipboardTests, marshall_withTextAdded_typeCharIsText)
|
||||
{
|
||||
Clipboard clipboard;
|
||||
clipboard.open(0);
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
clipboard.close();
|
||||
|
||||
String actual = clipboard.marshall();
|
||||
@@ -184,7 +184,7 @@ TEST(ClipboardTests, marshall_withTextAdded_lastSizeCharIs14)
|
||||
{
|
||||
Clipboard clipboard;
|
||||
clipboard.open(0);
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!"); // 14 chars
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!"); // 14 chars
|
||||
clipboard.close();
|
||||
|
||||
String actual = clipboard.marshall();
|
||||
@@ -199,11 +199,11 @@ TEST(ClipboardTests, marshall_withTextSize285_sizeCharsValid)
|
||||
{
|
||||
// 285 chars
|
||||
String data;
|
||||
data.append("Synergy is Free and Open Source Software that lets you ");
|
||||
data.append("Barrier is Free and Open Source Software that lets you ");
|
||||
data.append("easily share your mouse and keyboard between multiple ");
|
||||
data.append("computers, where each computer has it's own display. No ");
|
||||
data.append("special hardware is required, all you need is a local area ");
|
||||
data.append("network. Synergy is supported on Windows, Mac OS X and Linux.");
|
||||
data.append("network. Barrier is supported on Windows, Mac OS X and Linux.");
|
||||
|
||||
Clipboard clipboard;
|
||||
clipboard.open(0);
|
||||
@@ -242,7 +242,7 @@ TEST(ClipboardTests, marshall_withHtmlAndText_has2Formats)
|
||||
{
|
||||
Clipboard clipboard;
|
||||
clipboard.open(0);
|
||||
clipboard.add(IClipboard::kText, "synergy rocks");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks");
|
||||
clipboard.add(IClipboard::kHTML, "html sucks");
|
||||
clipboard.close();
|
||||
|
||||
@@ -260,13 +260,13 @@ TEST(ClipboardTests, marshall_withTextAdded_endsWithAdded)
|
||||
{
|
||||
Clipboard clipboard;
|
||||
clipboard.open(0);
|
||||
clipboard.add(IClipboard::kText, "synergy rocks!");
|
||||
clipboard.add(IClipboard::kText, "barrier rocks!");
|
||||
clipboard.close();
|
||||
|
||||
String actual = clipboard.marshall();
|
||||
|
||||
// string contains other data, but should end in the string we added.
|
||||
EXPECT_EQ("synergy rocks!", actual.substr(12));
|
||||
EXPECT_EQ("barrier rocks!", actual.substr(12));
|
||||
}
|
||||
|
||||
TEST(ClipboardTests, unmarshall_emptyData_hasTextIsFalse)
|
||||
@@ -292,11 +292,11 @@ TEST(ClipboardTests, unmarshall_withTextSize285_getTextIsValid)
|
||||
|
||||
// 285 chars
|
||||
String text;
|
||||
text.append("Synergy is Free and Open Source Software that lets you ");
|
||||
text.append("Barrier is Free and Open Source Software that lets you ");
|
||||
text.append("easily share your mouse and keyboard between multiple ");
|
||||
text.append("computers, where each computer has it's own display. No ");
|
||||
text.append("special hardware is required, all you need is a local area ");
|
||||
text.append("network. Synergy is supported on Windows, Mac OS X and Linux.");
|
||||
text.append("network. Barrier is supported on Windows, Mac OS X and Linux.");
|
||||
|
||||
String data;
|
||||
data += (char)0;
|
||||
@@ -336,7 +336,7 @@ TEST(ClipboardTests, unmarshall_withTextAndHtml_getTextIsValid)
|
||||
data += (char)0;
|
||||
data += (char)0;
|
||||
data += (char)14;
|
||||
data += "synergy rocks!";
|
||||
data += "barrier rocks!";
|
||||
data += (char)0;
|
||||
data += (char)0;
|
||||
data += (char)0;
|
||||
@@ -351,7 +351,7 @@ TEST(ClipboardTests, unmarshall_withTextAndHtml_getTextIsValid)
|
||||
|
||||
clipboard.open(0);
|
||||
String actual = clipboard.get(IClipboard::kText);
|
||||
EXPECT_EQ("synergy rocks!", actual);
|
||||
EXPECT_EQ("barrier rocks!", actual);
|
||||
}
|
||||
|
||||
TEST(ClipboardTests, unmarshall_withTextAndHtml_getHtmlIsValid)
|
||||
@@ -370,7 +370,7 @@ TEST(ClipboardTests, unmarshall_withTextAndHtml_getHtmlIsValid)
|
||||
data += (char)0;
|
||||
data += (char)0;
|
||||
data += (char)14;
|
||||
data += "synergy rocks!";
|
||||
data += "barrier rocks!";
|
||||
data += (char)0;
|
||||
data += (char)0;
|
||||
data += (char)0;
|
||||
@@ -392,7 +392,7 @@ TEST(ClipboardTests, copy_withSingleText_clipboardsAreEqual)
|
||||
{
|
||||
Clipboard clipboard1;
|
||||
clipboard1.open(0);
|
||||
clipboard1.add(Clipboard::kText, "synergy rocks!");
|
||||
clipboard1.add(Clipboard::kText, "barrier rocks!");
|
||||
clipboard1.close();
|
||||
|
||||
Clipboard clipboard2;
|
||||
@@ -400,5 +400,5 @@ TEST(ClipboardTests, copy_withSingleText_clipboardsAreEqual)
|
||||
|
||||
clipboard2.open(0);
|
||||
String actual = clipboard2.get(Clipboard::kText);
|
||||
EXPECT_EQ("synergy rocks!", actual);
|
||||
EXPECT_EQ("barrier rocks!", actual);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2015-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -15,11 +15,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "synergy/ArgParser.h"
|
||||
#include "barrier/ArgParser.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
using namespace synergy;
|
||||
using namespace barrier;
|
||||
|
||||
TEST(DeprecatedArgsParsingTests, parseDeprecatedArgs_cryptoPass_returnTrue)
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -15,13 +15,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "synergy/ArgParser.h"
|
||||
#include "synergy/ArgsBase.h"
|
||||
#include "test/mock/synergy/MockApp.h"
|
||||
#include "barrier/ArgParser.h"
|
||||
#include "barrier/ArgsBase.h"
|
||||
#include "test/mock/barrier/MockApp.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
using namespace synergy;
|
||||
using namespace barrier;
|
||||
using ::testing::_;
|
||||
using ::testing::Invoke;
|
||||
using ::testing::NiceMock;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2016 Symless
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "synergy/KeyMap.h"
|
||||
#include "barrier/KeyMap.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
#include "test/global/gmock.h"
|
||||
@@ -27,7 +27,7 @@ using ::testing::Return;
|
||||
using ::testing::ReturnRef;
|
||||
using ::testing::SaveArg;
|
||||
|
||||
namespace synergy {
|
||||
namespace barrier {
|
||||
|
||||
TEST(KeyMapTests, findBestKey_requiredDown_matchExactFirstItem)
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -16,9 +16,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "test/mock/synergy/MockKeyState.h"
|
||||
#include "test/mock/synergy/MockEventQueue.h"
|
||||
#include "test/mock/synergy/MockKeyMap.h"
|
||||
#include "test/mock/barrier/MockKeyState.h"
|
||||
#include "test/mock/barrier/MockEventQueue.h"
|
||||
#include "test/mock/barrier/MockKeyMap.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
#include "test/global/gmock.h"
|
||||
@@ -36,16 +36,16 @@ stubPollPressedKeys(IKeyState::KeyButtonSet& pressedKeys);
|
||||
void
|
||||
assertMaskIsOne(ForeachKeyCallback cb, void* userData);
|
||||
|
||||
const synergy::KeyMap::KeyItem*
|
||||
const barrier::KeyMap::KeyItem*
|
||||
stubMapKey(
|
||||
synergy::KeyMap::Keystrokes& keys, KeyID id, SInt32 group,
|
||||
synergy::KeyMap::ModifierToKeys& activeModifiers,
|
||||
barrier::KeyMap::Keystrokes& keys, KeyID id, SInt32 group,
|
||||
barrier::KeyMap::ModifierToKeys& activeModifiers,
|
||||
KeyModifierMask& currentState,
|
||||
KeyModifierMask desiredMask,
|
||||
bool isAutoRepeat);
|
||||
|
||||
synergy::KeyMap::Keystroke s_stubKeystroke(1, false, false);
|
||||
synergy::KeyMap::KeyItem s_stubKeyItem;
|
||||
barrier::KeyMap::Keystroke s_stubKeystroke(1, false, false);
|
||||
barrier::KeyMap::KeyItem s_stubKeyItem;
|
||||
|
||||
TEST(CKeyStateTests, onKey_aKeyDown_keyStateOne)
|
||||
{
|
||||
@@ -324,14 +324,14 @@ TEST(KeyStateTests, fakeKeyRepeat_nullKey_returnsFalse)
|
||||
KeyStateImpl keyState(eventQueue, keyMap);
|
||||
|
||||
// set the key to down (we need to make mapKey return a valid key to do this).
|
||||
synergy::KeyMap::KeyItem keyItem;
|
||||
barrier::KeyMap::KeyItem keyItem;
|
||||
keyItem.m_client = 0;
|
||||
keyItem.m_button = 1;
|
||||
ON_CALL(keyMap, mapKey(_, _, _, _, _, _, _)).WillByDefault(Return(&keyItem));
|
||||
keyState.fakeKeyDown(1, 0, 0);
|
||||
|
||||
// change mapKey to return NULL so that fakeKeyRepeat exits early.
|
||||
synergy::KeyMap::KeyItem* nullKeyItem = NULL;
|
||||
barrier::KeyMap::KeyItem* nullKeyItem = NULL;
|
||||
ON_CALL(keyMap, mapKey(_, _, _, _, _, _, _)).WillByDefault(Return(nullKeyItem));
|
||||
|
||||
bool actual = keyState.fakeKeyRepeat(1, 0, 0, 0);
|
||||
@@ -346,7 +346,7 @@ TEST(KeyStateTests, fakeKeyRepeat_invalidButton_returnsFalse)
|
||||
KeyStateImpl keyState(eventQueue, keyMap);
|
||||
|
||||
// set the key to down (we need to make mapKey return a valid key to do this).
|
||||
synergy::KeyMap::KeyItem keyItem;
|
||||
barrier::KeyMap::KeyItem keyItem;
|
||||
keyItem.m_client = 0;
|
||||
keyItem.m_button = 1; // set to 1 to make fakeKeyDown work.
|
||||
ON_CALL(keyMap, mapKey(_, _, _, _, _, _, _)).WillByDefault(Return(&keyItem));
|
||||
@@ -367,7 +367,7 @@ TEST(KeyStateTests, fakeKeyRepeat_validKey_returnsTrue)
|
||||
MockEventQueue eventQueue;
|
||||
KeyStateImpl keyState(eventQueue, keyMap);
|
||||
s_stubKeyItem.m_client = 0;
|
||||
s_stubKeystroke.m_type = synergy::KeyMap::Keystroke::kButton;
|
||||
s_stubKeystroke.m_type = barrier::KeyMap::Keystroke::kButton;
|
||||
s_stubKeystroke.m_data.m_button.m_button = 2;
|
||||
|
||||
// set the button to 1 for fakeKeyDown call
|
||||
@@ -475,10 +475,10 @@ assertMaskIsOne(ForeachKeyCallback cb, void* userData)
|
||||
ASSERT_EQ(1, ((KeyState::AddActiveModifierContext*)userData)->m_mask);
|
||||
}
|
||||
|
||||
const synergy::KeyMap::KeyItem*
|
||||
const barrier::KeyMap::KeyItem*
|
||||
stubMapKey(
|
||||
synergy::KeyMap::Keystrokes& keys, KeyID id, SInt32 group,
|
||||
synergy::KeyMap::ModifierToKeys& activeModifiers,
|
||||
barrier::KeyMap::Keystrokes& keys, KeyID id, SInt32 group,
|
||||
barrier::KeyMap::ModifierToKeys& activeModifiers,
|
||||
KeyModifierMask& currentState,
|
||||
KeyModifierMask desiredMask,
|
||||
bool isAutoRepeat)
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -15,9 +15,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "synergy/ArgParser.h"
|
||||
#include "synergy/ServerArgs.h"
|
||||
#include "test/mock/synergy/MockArgParser.h"
|
||||
#include "barrier/ArgParser.h"
|
||||
#include "barrier/ServerArgs.h"
|
||||
#include "test/mock/barrier/MockArgParser.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
@@ -37,7 +37,7 @@ server_stubCheckUnexpectedArgs()
|
||||
return false;
|
||||
}
|
||||
|
||||
TEST(ServerArgsParsingTests, parseServerArgs_addressArg_setSynergyAddress)
|
||||
TEST(ServerArgsParsingTests, parseServerArgs_addressArg_setBarrierAddress)
|
||||
{
|
||||
NiceMock<MockArgParser> argParser;
|
||||
ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(server_stubParseGenericArgs));
|
||||
@@ -48,7 +48,7 @@ TEST(ServerArgsParsingTests, parseServerArgs_addressArg_setSynergyAddress)
|
||||
|
||||
argParser.parseServerArgs(serverArgs, argc, kAddressCmd);
|
||||
|
||||
EXPECT_EQ("mock_address", serverArgs.m_synergyAddress);
|
||||
EXPECT_EQ("mock_address", serverArgs.m_barrierAddress);
|
||||
}
|
||||
|
||||
TEST(ServerArgsParsingTests, parseServerArgs_configArg_setConfigFile)
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
|
||||
using namespace synergy;
|
||||
using namespace barrier;
|
||||
|
||||
TEST(StringTests, format_formatWithArguments_formatedString)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2015-2016 Symless Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -38,7 +38,7 @@ using ::testing::Property;
|
||||
using ::testing::StrEq;
|
||||
using ::testing::AtLeast;
|
||||
|
||||
using namespace synergy;
|
||||
using namespace barrier;
|
||||
|
||||
inline const Matcher<const IpcMessage&> IpcLogLineMessageEq(const String& s) {
|
||||
const Matcher<const IpcLogLineMessage&> m(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2012-2016 Symless Ltd.
|
||||
* Copyright (C) 2011 Nick Bolton
|
||||
*
|
||||
@@ -16,16 +16,16 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "test/mock/synergy/MockKeyMap.h"
|
||||
#include "test/mock/synergy/MockEventQueue.h"
|
||||
#include "test/mock/barrier/MockKeyMap.h"
|
||||
#include "test/mock/barrier/MockEventQueue.h"
|
||||
#include "platform/OSXKeyState.h"
|
||||
|
||||
#include "test/global/gtest.h"
|
||||
#include "test/global/gmock.h"
|
||||
|
||||
TEST(OSXKeyStateTests, mapModifiersFromOSX_OSXMask_returnSynergyMask)
|
||||
TEST(OSXKeyStateTests, mapModifiersFromOSX_OSXMask_returnBarrierMask)
|
||||
{
|
||||
synergy::KeyMap keyMap;
|
||||
barrier::KeyMap keyMap;
|
||||
MockEventQueue eventQueue;
|
||||
OSXKeyState keyState(&eventQueue, keyMap);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* barrier -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2016 Symless Inc.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
@@ -36,7 +36,7 @@ TEST(SerialKeyTests, decode_invalidDigit_returnEmptyString)
|
||||
TEST(SerialKeyTests, decode_validSerial_returnPlainText)
|
||||
{
|
||||
std::string plainText = SerialKey::decode("53796E6572677920726F636B7321");
|
||||
EXPECT_EQ("Synergy rocks!", plainText);
|
||||
EXPECT_EQ("Barrier rocks!", plainText);
|
||||
}
|
||||
|
||||
TEST(SerialKeyTests, parse_noParty_invalid)
|
||||
@@ -49,7 +49,7 @@ TEST(SerialKeyTests, parse_noParty_invalid)
|
||||
TEST(SerialKeyTests, parse_invalidPartsLenghth_invalid)
|
||||
{
|
||||
SerialKey serial;
|
||||
bool r = serial.parse("{Synergy;Rocks}");
|
||||
bool r = serial.parse("{Barrier;Rocks}");
|
||||
EXPECT_FALSE(r);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user